NumberUtils

Utilities for working with numbers.
Source:

Methods

(static) roundDownToNearestStep(num, step) → {Number}

Rounds a given number down to the nearest specified number.
Source:
Parameters:
Name Type Description
num Number The number to round.
step Number The step to round down to.
Returns:
- The rounded number.
Type
Number
NumberUtils.roundDownToNearestStep(57, 30); // 30
NumberUtils.roundDownToNearestStep(161, 15); // 150