clampTo method

int clampTo(
  1. int min,
  2. int max
)

Returns the value clamped between min and max.

Implementation

int clampTo(int min, int max) => clamp(min, max).toInt();