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

boundsThe bounds to get the linear parameter from.
positionA position within the bounds.

Returns

Vector3The 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

boundsThe bounds to get the linear parameter from.
positionA position within the bounds.

Returns

Vector3The linear parameter t where each axis falls in the range [0..1].