API Reference › Angle › Angle.lerp
method

Angle.lerp

Angle.lerp(a, b, t) -> fixed

Interpolates from a toward b along the shortest arc (t is a fixed 0..1), so a turn never spins the long way around.

Example

program Demo {
  handler Step phase Update {
    facing = Angle.lerp(facing, target, 0.1)
  }
}
← All symbols