Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/min-max"

Index

Functions

Functions

minMax

  • minMax(min: number, max: number, value: number): number

  • Example usage:

    import { minMax } from "@thalesrc/js-utils/math";
    
    const limitedValue = minMax(200, 300, Math.random() * 1000);

    Example as Math static:

    import "@thalesrc/js-utils/math/static/min-max";
    
    const limitedValue = Math.minMax(200, 300, Math.random() * 1000);

    Parameters

    • min: number

      minimum limit

    • max: number

      maximum limit

    • value: number

      value to limit

    Returns number

    the limited value (returns NaN if an argument is NaN)

Generated using TypeDoc