Skip to content

divEuclid

divEuclid(dividend, divisor): number

Defined in: packages/core/src/number/integer/div-euclid.ts:12

Euclidean division — the quotient whose remainder is modEuclid, so a === divEuclid(a, b) * b + modEuclid(a, b).

Agrees with divFloor for a positive divisor and rounds the other way for a negative one: divEuclid(7, -2) === -3, divFloor(7, -2) === -4.

number

number

number

When divisor is zero.