Options
All
  • Public
  • Public/Protected
  • All
Menu

Useful math functions

Hierarchy

  • MathTools

Index

Constructors

Properties

Methods

Constructors

Properties

DefaultRoundingPrecision: number

Default rounding precision for GUI elements. It should be set to a power of ten, where the exponent means the number of decimal digits to round to, i.e, 100 means 2 decimal digits, 1000 means 3 decimal digits, etc. Default is 100 (2 decimal digits).

Methods

  • Round(value: number, precision?: number): number
  • Rounds a number to the nearest multiple of a given precision

    Parameters

    • value: number

      the value to be rounded

    • Optional precision: number

      the multiple to which the value will be rounded. Default is 100 (2 decimal digits)

    Returns number

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme