Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/typical/num.ts

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
import * as rimbu from "https://deno.land/x/rimbu@0.13.1/typical/num.ts";

Type Aliases

Returns the sum of given numbers.

Decreases a positive number by 1, or if the number is not positive, returns never.

Returns the result of dividing the first given natural number by the second.

Returns a tuple containing the quotient and remainer of dividing the first number by the second.

Returns true if the given numbers are equal.

Returns true if the first given number is greater than the second.

Returns true if the given first natural number is greater or equal than the second. Returns never otherwise.

Add 1 to the given natural number.

Returns true if the given number is greater than or equal to given L, and less than or equal to given H, and returns false otherwise.

Returns true if the given natural number is even, or never otherwise.

Returns true if the given number is a natural number (>= 0), false otherwise

Returns true if the given number is negative (< 0), false otherwise.

Returns true if the given natural number is odd, or never otherwise.

Returns true if the given number is positive (> 0), false otherwise

Returns true if the first given number is less than the second.

Returns true if the first given number is less than or equal to the second.

Returns the largest of the given 2 natural numbers, of never otherwise

Returns the smallest of the given 2 natural numbers, of never otherwise

Returns the remainder after dividing the first given natural number by the second.

Returns the result of multiplying the given natural numbers.

Returns true if the given numbers are not equal.

Returns the power of the first natural number to the second given natural number.

Returns the result of subtracting N2 from N1.