Apply a floored modulo to the target vector, so results take the sign of the modulo value rather than the target.
Target vector.
The value to modo by.
Error - When a component of value is zero.
Error - When a computed component is NaN or non-finite.
modo({ x: 5, y: -5 }, 3); // -> { x: 2, y: 1 } Copy
modo({ x: 5, y: -5 }, 3); // -> { x: 2, y: 1 }
Destination object to store the result.
const result = { x: 0, y: 0 };modo({ x: 5, y: -5 }, 3, result); // result -> { x: 2, y: 1 } Copy
const result = { x: 0, y: 0 };modo({ x: 5, y: -5 }, 3, result); // result -> { x: 2, y: 1 }
Apply a floored modulo to the target vector, so results take the sign of the modulo value rather than the target.