Skip to content

Function: floorMod

floorMod(a, n): number

Get floored division

Parameters

NameType
anumber
nnumber

Returns

number

returns remainder of floored division, i.e., floor(a / n). Useful for consistent modulo of negative numbers. See http://en.wikipedia.org/wiki/Modulo_operation.

Defined in

utils.ts:177

Released under the MIT License.