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 themin
if the number is less thanmin
,max
if 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 tofrom
and 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 betweenmin
andmax
inclusive. -
isNotBetween(
num from, num to) → bool -
Available on num, provided by the NumRangeExtensions extension
Is NOT this greater than or equal tofrom
and less than or equal toto
?