DoubleExtensions extension
includes ComparableExtensions on double
- on
Methods
-
limitTo(
double min, double max) → double -
Available on double, provided by the DoubleExtensions extension
returns this if it is betweenmin
andmax
(inclusive) otherwise returnsmin
ormax
whichever is closer -
withLowerLimit(
double min) → double -
Available on double, provided by the DoubleExtensions extension
returns this if it is not greater than max, otherwise max -
withUpperLimit(
double max) → double -
Available on double, provided by the DoubleExtensions extension
returns this if it is not greater thanmax
, otherwisemax