clamp method

double clamp(
  1. double value
)

value clamped into [min, max].

Implementation

double clamp(double value) => value.clamp(min, max);