round<T extends num> function
Rounds value
to the nearest nearest
.
Implementation
T round<T extends num>(T value, num nearest) => nearest == 1 ? value : (value / nearest).round() * nearest as T;
Rounds value
to the nearest nearest
.
T round<T extends num>(T value, num nearest) => nearest == 1 ? value : (value / nearest).round() * nearest as T;