Method GetDistanceToInterpolation
GetDistanceToInterpolation(BezierCurve, float)
Gets the normalized interpolation, (t), that corresponds to a distance on a Bezier
Declaration
public static float GetDistanceToInterpolation(BezierCurve curve, float distance)
Parameters
Type | Name | Description |
---|---|---|
Bezier |
curve | The Bezier |
float | distance | The curve-relative distance to convert to an interpolation ratio (also referred to as 't'). |
Returns
Type | Description |
---|---|
float | Returns the normalized interpolation ratio associated to distance on the designated curve. |
Remarks
It is inefficient to call this method frequently. For better performance create a
Distance
GetDistanceToInterpolation<T>(T, float)
Return the normalized interpolation (t) corresponding to a distance on a Bezier
Declaration
public static float GetDistanceToInterpolation<T>(T lut, float distance) where T : IReadOnlyList<DistanceToInterpolation>
Parameters
Type | Name | Description |
---|---|---|
T | lut | A look-up table of distance to 't' values. See Calculate |
float | distance | The curve-relative distance to convert to an interpolation ratio (also referred to as 't'). |
Returns
Type | Description |
---|---|
float | The normalized interpolation ratio associated to distance on the designated curve. |
Type Parameters
Name | Description |
---|---|
T | The collection type. |