lerp

fun lerp(other: Pose2d, t: Double): Pose2d(source)

Linear interpolation (lerp) toward another pose.

Interpolates both position and heading:

  • Position: Linear interpolation of the position vectors

  • Heading: Spherical linear interpolation of the rotations

Return

the interpolated pose

Parameters

other

the target pose to interpolate toward

t

the interpolation parameter in range 0, 1