Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MathHelper

Math helper to extends or create helper method.

author

Nicolas GILLE nic.gille@gmail.com

since

0.4.0

version

1.0

license

MIT

Hierarchy

  • MathHelper

Index

Methods

Methods

Static floor

  • floor(x: number, precision?: number): number
  • Return the value of a number rounded to the nearest number.

    since

    0.4.0

    version

    1.0

    Parameters

    • x: number

      The number to rounded.

    • Default value precision: number = 2

      The precision expected. By default, the precision is equal at 2 digits.

    Returns number

    The value of the given number rounded to the nearest number.

Static square

  • square(x: number): number
  • Return the squared value of x.

    since

    0.4.0

    version

    1.0

    Parameters

    • x: number

      Number to get the squared value.

    Returns number

    The number upped to the square value.

Generated using TypeDoc