Defines the Polar class.
The Polar class, just like the Complex class, is used by the Hypertree, ST and RGraph as a 2D point representation.
http://en.wikipedia.org/wiki/Polar_coordinates
| Polar.js | Defines the Polar class. |
| Polar | A multi purpose polar representation. |
| Functions | |
| getc | Returns a complex number. |
| getp | Returns a Polar representation. |
| set | Sets a number. |
| setc | Sets a Complex number. |
| setp | Sets a polar number. |
| clone | Returns a copy of the current object. |
| toComplex | Translates from polar to cartesian coordinates and returns a new Complex instance. |
| add | Adds two Polar instances. |
| scale | Scales a polar norm. |
| equals | Comparison method. |
| $add | Adds two Polar instances affecting the current object. |
| $madd | Adds two Polar instances affecting the current object. |
| $scale | Scales a polar instance affecting the object. |
| isZero | Returns true if the number is zero. |
| interpolate | Calculates a polar interpolation between two points at a given delta moment. |
A multi purpose polar representation.
The Polar class, just like the Complex class, is used by the Hypertree, ST and RGraph as a 2D point representation.
http://en.wikipedia.org/wiki/Polar_coordinates
| theta | An angle. |
| rho | The norm. |
| Functions | |
| getc | Returns a complex number. |
| getp | Returns a Polar representation. |
| set | Sets a number. |
| setc | Sets a Complex number. |
| setp | Sets a polar number. |
| clone | Returns a copy of the current object. |
| toComplex | Translates from polar to cartesian coordinates and returns a new Complex instance. |
| add | Adds two Polar instances. |
| scale | Scales a polar norm. |
| equals | Comparison method. |
| $add | Adds two Polar instances affecting the current object. |
| $madd | Adds two Polar instances affecting the current object. |
| $scale | Scales a polar instance affecting the object. |
| isZero | Returns true if the number is zero. |
| interpolate | Calculates a polar interpolation between two points at a given delta moment. |
getc: function( simple )
Returns a complex number.
| simple | optional If true, this method will return only an object holding x and y properties and not a Complex instance. Default’s false. |
A complex number.
equals: function( c )
Comparison method.
Returns true if the theta and rho properties are equal.
| c | A Polar number. |
true if the theta and rho parameters for these objects are equal. false otherwise.
Returns a complex number.
getc: function( simple )
Returns a Polar representation.
getp: function()
Sets a number.
set: function( v )
Sets a Complex number.
setc: function( x, y )
Sets a polar number.
setp: function( theta, rho )
Returns a copy of the current object.
clone: function()
Translates from polar to cartesian coordinates and returns a new Complex instance.
toComplex: function( simple )
Adds two Polar instances.
add: function( polar )
Scales a polar norm.
scale: function( number )
Comparison method.
equals: function( c )
Adds two Polar instances affecting the current object.
$add: function( polar )
Adds two Polar instances affecting the current object.
$madd: function( polar )
Scales a polar instance affecting the object.
$scale: function( number )
Returns true if the number is zero.
isZero: function ()
Calculates a polar interpolation between two points at a given delta moment.
interpolate: function( elem, delta )