You are here: Start » FIL.NET » Function Reference » Geometry 2D » Geometry 2D Interpolations » FIL.LerpAngles
Linearly interpolates between two angles in the direction of minimum turn.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void LerpAngles ( float inAngle0, float inAngle1, FilNet.RotationDirection? inRotationDirection, FilNet.AngleRange inAngleRange, float inLambda, bool inInverse, out float outAngle )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inAngle0 | float | |||
![]() | inAngle1 | float | |||
![]() | inRotationDirection | FilNet.RotationDirection? | Clockwise, counter-clockwise or auto. Default value: ftl::NIL. | ||
![]() | inAngleRange | FilNet.AngleRange | _0_180 | Default value: _0_180. | |
![]() | inLambda | float | Interpolation between the input angles where 0.0 value is equal to inAngle0 and 1.0 to inAngle1. | ||
![]() | inInverse | bool | |||
![]() | outAngle | float |
Examples
![]() |
LerpAngles performed on red inAngle0 = 15 and blue inAngle1 = 135 with inLambda = 0,25 and inAngleRange = 0-360. Green is the resulting outAngle.
![]() |
LerpAngles performed on red inAngle0 = 15 and blue inAngle1 = 135 with inLambda = -1,0 and inAngleRange = 0-360. Green is the resulting outAngle.
Remarks
Please note that:
- interpolation begins at inAngle0,
- for positive inLambda values interpolation is performed in the direction given in the inRotationDirection parameter while for negative - in the inverted direction.