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 between min and max (inclusive) otherwise returns min or max 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 than max, otherwise max