Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/number"

Index

Functions

areNumbersEqual

  • areNumbersEqual(a: number, b: number): boolean
  • Indicates if the given numbers are equal

    export

    Parameters

    • a: number
    • b: number

    Returns boolean

deg2rad

  • deg2rad(deg: number): number
  • Converts the given angle in degrees to radians

    Parameters

    • deg: number

      The angle in degrees

    Returns number

getClosestScaleIndex

  • getClosestScaleIndex(scales: [number, number], scale: number): number
  • Gets the closest scale index for the given scale and scale array pair

    export

    Parameters

    • scales: [number, number]
    • scale: number

    Returns number

getFiniteScaleIndexForScale

  • getFiniteScaleIndexForScale(finiteScaleList: number[], scale: number): number
  • Gets the applicable finite scale index for the given scale and finite scale array

    export

    Parameters

    • finiteScaleList: number[]
    • scale: number

    Returns number

restrictToRange

  • restrictToRange(val: number, lower: number, upper: number): number
  • Restricts the given number to the given range

    export

    Parameters

    • val: number
    • lower: number
    • upper: number

    Returns number

scaleRangeBetween

  • scaleRangeBetween(scale: number, minScale: number, maxScale: number): boolean
  • Indicates if the given scale is within the specified range

    export

    Parameters

    • scale: number
    • minScale: number
    • maxScale: number

    Returns boolean

Generated using TypeDoc