ceil<T extends num> function

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

Ceils value to the nearest nearest.

Implementation

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