API Reference › Ease › Ease.in_out
method

Ease.in_out

Ease.in_out(t) -> fixed

Returns the smooth 3t^2 - 2t^3 S-curve: slow at both ends, fastest in the middle. Use it for a polished there-and-back or point-to-point move that neither jerks off the mark nor slams into the target.

Example

program Demo {
  handler Step phase Update {
    let a = Math.lerp(0.0, 1.0, Ease.in_out(progress))
  }
}
← All symbols