Skip to main content
Module

x/rambda/index.d.ts>mathMod

Faster and smaller alternative to Ramda
Go to Latest
function mathMod
import { mathMod } from "https://deno.land/x/rambda@v7.0.1/index.d.ts";

R.mathMod behaves like the modulo operator should mathematically, unlike the % operator (and by extension, R.modulo). So while -17 % 5 is -2, mathMod(-17, 5) is 3.

Parameters

x: number
y: number

Returns

number

Parameters

x: number

Returns

(y: number) => number