Type Angle

Angle Type

Methods

getForward () Return the Forward Vector ( direction the angle points ).
getRight () Return the Right Vector relative to the angle dir.
getUp () Return the Up Vector relative to the angle dir.
isZero () Returns if p,y,r are all 0.
normalize () Normalise angles eg (0,181,1) -> (0,-179,1).
rotateAroundAxis (v, r) Rotates the angle around the specified axis by the specified degrees.
set (a) Copies p,y,r from second angle to the first.
setZero () Sets p,y,r to 0.


Methods

ang_methods:getForward ()
Return the Forward Vector ( direction the angle points ).

Return value:

    vector normalised.
ang_methods:getRight ()
Return the Right Vector relative to the angle dir.

Return value:

    vector normalised.
ang_methods:getUp ()
Return the Up Vector relative to the angle dir.

Return value:

    vector normalised.
ang_methods:isZero ()
Returns if p,y,r are all 0.

Return value:

    boolean
ang_methods:normalize ()
Normalise angles eg (0,181,1) -> (0,-179,1).

Return value:

    nil
ang_methods:rotateAroundAxis (v, r)
Rotates the angle around the specified axis by the specified degrees.

Parameters:

  • v: Axis
  • r: Number of degrees.

Return value:

    nil
ang_methods:set (a)
Copies p,y,r from second angle to the first.

Parameters:

  • a: Angle to copy from.

Return value:

    nil
ang_methods:setZero ()
Sets p,y,r to 0. This is faster than doing it manually.

Return value:

    nil

Valid XHTML 1.0!