UnitIntervalRange
Struct in Zigurous.DataStructures
Implements INumberRange<T>, IRange<T>
Declaration
[Serializable]
public struct UnitIntervalRange : INumberRange<float>, IRange<float>Description
A range of values between zero and one.
Static Properties
| zero | Shorthand for writing UnitIntervalRange(0f, 0f). |
| one | Shorthand for writing UnitIntervalRange(1f, 1f). |
| minMax | Shorthand for writing UnitIntervalRange(0f, 1f). |
Properties
| min | The lower bound of the range. |
| max | The upper bound of the range. |
| delta | The difference between the maximum and minimum values (Read only). |
| median | The median value of the range (Read only). |
Constructors
| UnitIntervalRange | Creates a new range with the specified values. |
Methods
| Random | Returns a random value in the range. |
| Includes | Checks if a value is in the range. |
| Clamp | Clamps a value to the range. |
| Lerp | Linearly interpolates between the range by t. |
| InverseLerp | Calculates the linear parameter t that produces the interpolant value within the range. |