RangeD
Description
A closed interval of numbers (64-bit floating-point): [Start..End]
+----+----+----+----O----+----+----+----+---> Number axis -4 -3 -2 -1 0 1 2 3 4 ^ ^ Start End \___________________/ Length := End - Start
Public / Constants
Inv
The value of Max, with swapped start and end values.
This range can be used as the initial value for finding the minimum/maximum of a series of numbers (see Grow
).
Public / Constructors
Closed
Returns a range that represents the closed interval [a..b]
(i.e. both a
and b
are contained in the range).
Public / Methods
Contains
2 overloads
Checks if this range contains the given value.
Checks if this range fully contains the given range.
Grow
2 overloads
Grows this range so that it contains the given value.
Grows this range so that it fully contains the given range.
Transform
Transforms the given value from this range to the given range.
The method maps Start to target in. RangeF.Start and End to target in. RangeF.End.
No clamping is performed by this method.