The Number3D class represents a value in a three-dimensional coordinate system.
Properties x, y and z represent the horizontal, vertical and z the depth axes respectively.
modulo:Number [read-only]
Modulo
Implementation
public function get modulo():Number
moduloSquared:Number [read-only]Implementation
public function get moduloSquared():Number
public static var toDEGREES:Number
public static var toRADIANS:Number
public var x:Number
The horizontal coordinate value.
public var y:Number
The vertical coordinate value.
public var z:Number
The depth coordinate value.
ZERO:Number3D [read-only]
Returns a Number3D object with x, y and z properties set to zero.
Implementation
public static function get ZERO():Number3D
public function Number3D(x:Number = 0, y:Number = 0, z:Number = 0)
Creates a new Number3D object whose three-dimensional values are specified by the x, y and z parameters. If you call this constructor function without parameters, a Number3D with x, y and z properties set to zero is created.
Parameters
| x:Number (default = 0) — The horizontal coordinate value. The default value is zero.
|
| |
| y:Number (default = 0) — The vertical coordinate value. The default value is zero.
|
| |
| z:Number (default = 0) — The depth coordinate value. The default value is zero.
|
public static function add(v:Number3D, w:Number3D):Number3D
Add
Parameters
Returns
public function clone():Number3D
Returns a new Number3D object that is a clone of the original instance with the same three-dimensional values.
Returns
| Number3D —
A new Number3D instance with the same three-dimensional values as the original Number3D instance.
|
public function copyFrom(n:Number3D):void
Copies the values of this Number3d to the passed Number3d.
Parameters
public function copyTo(n:Number3D):void
Copies the values of this Number3d to the passed Number3d.
Parameters
public static function cross(v:Number3D, w:Number3D, targetN:Number3D = null):Number3D
Cross product. Now optionally takes a target Number3D to put the change into. So we're not constantly making new number3Ds.
Maybe make a crossEq function?
Parameters
Returns
public static function dot(v:Number3D, w:Number3D):Number
Dot product.
Parameters
Returns
public function isModuloEqualTo(v:Number):BooleanParameters
Returns
public function isModuloGreaterThan(v:Number):BooleanParameters
Returns
public function isModuloLessThan(v:Number):Boolean
Super fast modulo(length, magnitude) comparisons.
Parameters
Returns
public function minusEq(v:Number3D):void
Subtracts the vector passed to this vector. The same as the -= operator.
Parameters
public function multiplyEq(n:Number):void
Multiplies the vector by a number. The same as the operator
Parameters
public function normalize():void
Normalize.
public function plusEq(v:Number3D):void
Adds the vector passed to this vector. The same as the += operator.
Parameters
public function reset(newx:Number = 0, newy:Number = 0, newz:Number = 0):void
Quick way to set the properties of the Number3D
Parameters
| newx:Number (default = 0) |
| |
| newy:Number (default = 0) |
| |
| newz:Number (default = 0) |
public function rotateX(angle:Number):void
Parameters
public function rotateY(angle:Number):voidParameters
public function rotateZ(angle:Number):voidParameters
public static function sub(v:Number3D, w:Number3D):Number3D
Subtract.
Parameters
Returns
public function toString():String
Returns a string value representing the three-dimensional values in the specified Number3D object.
Returns