floor<T extends num> function

T floor<T extends num>(
  1. T value,
  2. num nearest
)

Floors value to the nearest nearest.

Implementation

T floor<T extends num>(T value, num nearest) =>  nearest == 1 ? value : (value / nearest).floor() * nearest as T;