TypedNumScrewdriver<T extends num> extension
Provides typed extensions for num and all its subtypes.
- on
-
- T
Methods
-
clampAtLeast(
T lowerBound) → T -
Returns this value if it is greater than or equal to
lowerBound
. ReturnslowerBound
otherwise. -
clampAtMost(
T upperBound) → T -
Returns this value if it is less than or equal to
upperBound
. ReturnsupperBound
otherwise. -
max(
T upperBound, {bool exclusive = false}) → T -
Returns
upperBound
if this value is greater than or equal toupperBound
, otherwise returns this value. -
min(
T lowerBound, {bool exclusive = false}) → T -
Returns
lowerBound
if this value is less than or equal tolowerBound
, Otherwise returns this value.