Limits

Limit/Span (Min,Max) Pair.

TODO: Simultaneous min and max (minmax) can be optimized to 3/4 comparison. TODO: Decide on either Span, MinMax or Limits

Members

Aliases

expand
alias expand = include
Undocumented in source.

Functions

include
auto ref include(T a)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

max
T max [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
min
T min [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

alias T = int;
Limits!T x;
assert(x.min == T.max);
assert(x.max == T.min);
x.expand(-10);
x.expand(10);
assert(x.min == -10);
assert(x.max == +10);

See Also

Meta