Rounds v by every. Middle values are rounded up by default.
v
every
quantiseEvery(11, 10); // 10quantiseEvery(25, 10); // 30quantiseEvery(0, 10); // 0quantiseEvery(4, 10); // 0quantiseEvery(100, 10); // 100 Copy
quantiseEvery(11, 10); // 10quantiseEvery(25, 10); // 30quantiseEvery(0, 10); // 0quantiseEvery(4, 10); // 0quantiseEvery(100, 10); // 100
Also works with decimals
quantiseEvery(1.123, 0.1); // 1.1quantiseEvery(1.21, 0.1); // 1.2 Copy
quantiseEvery(1.123, 0.1); // 1.1quantiseEvery(1.21, 0.1); // 1.2
Value to quantise
Number to quantise to
If true (default), the exact middle rounds up to next step.
Rounds
v
byevery
. Middle values are rounded up by default.Also works with decimals