Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/typical/num.ts>InRange

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

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.

Examples

Example 1

InRange<4, 5, 10> => false
InRange<6, 5, 10> => true
InRange<5, 5, 10> => true

Type Parameters

N extends number
L extends number
H extends number
definition: GreaterThanOrEqual<N, L> & LessThanOrEqual<N, H> extends never ? false : true