Skip to content

@emile/engine


@emile/engine / math/lerp / lerpAngle

Function: lerpAngle()

lerpAngle(a, b, t): number

Defined in: src/math/lerp.ts:35

Linearly interpolates between rotation angles.

This function ensures that the interpolation is always done in the shortest direction.

The angles are expected to be in radians.

Parameters

a

number

The start rotation angle.

b

number

The end rotation angle.

t

number

The interpolation parameter.

Returns

number

The interpolated rotation angle.