Holomatix

Log In / Register


Purchase
Vector3d.add()

[NOTE: This method does not work because add is a reserved word. It will be renamed. Meanwhile, add the x, y, z properties separately using myVec3d.x += ...]

Usage

myVec3d.add(x:Number, y:Number, z:Number) : Void

myVec3d.add(vec3d:Vector3d) : Void

Parameters

  • x The amount to add to the x property of myVec3d.
  • y The amount to add to the y property of myVec3d.
  • z The amound to add to the z property of myVec3d.
  • vec3d A Vector3d instance whose x, y and z properties should be added to the x, y and z properties of myVec3d.

Returns

Nothing

Description

Method; adds a 3d vector to this Vector3d, represented as either a Vector3d instance or x, y, z displacements.

Example

var vec1 = new Vector3d(4, 5, 6);
vec1.add(10, -5, 2.3);
trace(vec1); //displays (14, 0, 8.3) 
 
< Prev   Next >


© Copyright 2000-2011 Holomatix Ltd. All rights reserved.