Struct FloatRange
Represents a range between two single-precision floating point numbers
public readonly struct FloatRange
- Inherited Members
Constructors
FloatRange(float, float)
Creates a new instance of the FloatRange class
[JsonConstructor]
public FloatRange(float start, float end)
Parameters
Properties
End
Gets the end value of the range
public float End { get; }
Property Value
Start
Gets the start value of the range
public float Start { get; }
Property Value
Methods
GetRandomValue(bool)
public float GetRandomValue(bool inclusive = true)
Parameters
Returns
- float
The pseudo-random value
IsInRange(float, bool)
Determines whether the given value is in this range
public bool IsInRange(float value, bool inclusive = true)
Parameters
valuefloatThe value to check
inclusiveboolWhether the value may be equal to Start or End
Defaults to true