IntRange
Struct in Zigurous.Architecture
Implements INumberRange<T>, IRange<T>
Declaration
[Serializable]
public struct IntRange : INumberRange<int>, IRange<int>
Description
A range of int values.
Static Properties
zero | Shorthand for writing IntRange(0, 0) . |
one | Shorthand for writing IntRange(1, 1) . |
positive | Shorthand for writing IntRange(0, int.MaxValue) . |
negative | Shorthand for writing IntRange(int.MinValue, 0) . |
minMax | Shorthand for writing IntRange(int.MinValue, int.MaxValue) . |
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
IntRange | Creates a new range with the specified values. |
Methods
Random | Returns a random value in the range [inclusive, exclusive). |
RandomInclusive | Returns a random value in the range [inclusive, inclusive]. |
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. |