mirror of
https://github.com/chenasraf/wheel_spinner.git
synced 2026-05-17 17:48:00 +00:00
6 lines
166 B
Dart
6 lines
166 B
Dart
import 'dart:math';
|
|
|
|
/// clamps [value] to [min] and [max]
|
|
double clamp<T extends num>(T number, T low, T high) =>
|
|
max(low * 1.0, min(number * 1.0, high * 1.0));
|