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. Returns lowerBound otherwise.
clampAtMost(T upperBound) → T
Returns this value if it is less than or equal to upperBound. Returns upperBound otherwise.
max(T upperBound, {bool exclusive = false}) → T
Returns upperBound if this value is greater than or equal to upperBound, otherwise returns this value.
min(T lowerBound, {bool exclusive = false}) → T
Returns lowerBound if this value is less than or equal to lowerBound, Otherwise returns this value.