Math


The math module has been create to help with common mathematical problems.



Module Details


Variables (Members):


Name

Type

Default Value

Description

Random

  • null

Array holding the Randoms functions of the module

Trigonometry

  • null
  • null
  • null

Array holding the Trigonometry functions of the module



Functions:


Random:


Name

Arguments

Return

Description

Randomizer

  • Integer: min - Minimum number to generate
  • Integer: max - Maximum number to generate

VOID

Generate a Random between a range



Trigonometry:


Name

Arguments

Return

Description

AngleRadiusFromCoordsAndObject

  • Integer: min - Minimum number to generate
  • Integer: max - Maximum number to generate
  • JQuery DOM Object: Object - Reference object to define position

Integer

Get the angle based on the co-ordnance ON a object.

CoordsFromAngleRadius

  • Integer: angle - angles you want to use for your calculation
  • Integer: radius - Position from the center

Class:

  • Integer: x - X co-ordnance
  • Integer: y - Y co-ordnance

Simple way to do the cosinus (x) and sinus (y) of the angle.

AngleFromCoords

  • Float: X - X Position [-1,1] (more if outside defined circle).
  • Float: Y - Y Position [-1,1] (more if outside defined circle).
  • Float: Radius - Radius reference

Float

Convert coordinate to an angle (it consider radius use 1 for default radius).

Created with the Personal Edition of HelpNDoc: Free EPub and documentation generator