UnitIntervalRange


Declaration

[Serializable]
public struct UnitIntervalRange : INumberRange<float>, IRange<float>

Description

A range of values between zero and one.

Static Properties

zeroShorthand for writing UnitIntervalRange(0f, 0f).
oneShorthand for writing UnitIntervalRange(1f, 1f).
minMaxShorthand for writing UnitIntervalRange(0f, 1f).

Properties

minThe lower bound of the range.
maxThe upper bound of the range.
DeltaThe difference between the maximum and minimum values (Read only).
MedianThe median value of the range (Read only).

Constructors

UnitIntervalRangeCreates a new range with the specified values.

Methods

RandomReturns a random value in the range.
IncludesChecks if a value is in the range.
ClampClamps a value to the range.
LerpLinearly interpolates between the range by t.
InverseLerpCalculates the linear parameter t that produces the interpolant value within the range.