BoundsExtensions.InverseLerp
Extension Method in BoundsExtensions
Declaration
public static Vector3 InverseLerp(this Bounds bounds, Vector3 position)
Description
Returns the linear parameter t
that produces the interpolant for each axis within the bounds' minimum and maximum values.
Parameters
bounds | The bounds to get the linear parameter from. |
position | A position within the bounds. |
Returns
Vector3 | The linear parameter t where each axis falls in the range [0..1]. |
Overload
Declaration
public static Vector3 InverseLerp(this BoundsInt bounds, Vector3Int position)
Description
Returns the linear parameter t
that produces the interpolant for each axis within the bounds' minimum and maximum values.
Parameters
bounds | The bounds to get the linear parameter from. |
position | A position within the bounds. |
Returns
Vector3 | The linear parameter t where each axis falls in the range [0..1]. |