NumRangeExtensions extension
Extension methods for num (and its subtypes like int, double).
- on
Methods
-
forceInRange(
num min, num max) → num -
Available on num, provided by the NumRangeExtensions extension
Returns theminif the number is less thanmin,maxif greater thanmax, or the number itself otherwise. -
isBetween(
num from, num to) → bool -
Available on num, provided by the NumRangeExtensions extension
Is this greater than or equal tofromand less than or equal toto? -
isInRange(
num min, num max) → bool -
Available on num, provided by the NumRangeExtensions extension
Returns true if the number is betweenminandmaxinclusive. -
isNotBetween(
num from, num to) → bool -
Available on num, provided by the NumRangeExtensions extension
Is NOT this greater than or equal tofromand less than or equal toto?