RangeL
Description
A half-closed range of numbers (64-bit integers): [Start..End[
Last := End - 1 vvvvv +----+----+----+----+----+----+----+----+----+ | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 |--> Number axis +----+----+----+----+----+----+----+----+----+ ^^^^^ ^^^^^ Start (inclusive) End (exclusive) \___________________/ 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).
Of
3 overloads
Returns the shortest possible range that contains the given value.
Returns the shortest possible range that contains the given values.
Returns the shortest possible range that contains the given values.
Open
Returns a range that represents the open interval ]a..b[
(i.e. neither a
nor b
is 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 Last to target in. RangeF.End.
No clamping is performed by this method.