![]() float |
length |
![]() string |
textual form |
![]() float |
x |
![]() float |
y |
![]() float |
z |
![]() doesn't return a value |
add function add(XYZ) Note: it does not return a new object, just modifies the existing one |
![]() returns XYZ |
create new XYZ object copying the coordinates function clone() Note: copying object references does not create new objects. Use clone() if a new object is needed. |
![]() returns float |
get one of coordinates function get(integer index) this function makes the XYZ objects "indexable" (so you can use [] for accessing subsequent fields, like in Vector) |
![]() returns XYZ |
create new XYZ object function new(float x, float y, float z) 3D vectors objects can be also created using the (x,y,z) notation, i.e. var v=(1,2,3) is the same as var v=XYZ.new(1,2,3); |
![]() doesn't return a value |
normalize function normalize() scales the vector length to 1.0 |
![]() doesn't return a value |
reverse rotate using Orient object function revRotate(Orient) |
![]() doesn't return a value |
rotate using Orient object function rotate(Orient) |
![]() doesn't return a value |
multiply by scalar function scale(float) |
![]() doesn't return a value |
set (copy) coordinates from another XYZ object function set(XYZ) |
![]() doesn't return a value |
set individual 3 coordinates function set3(float x, float y, float z) |
![]() doesn't return a value |
subtract function sub(XYZ) Note: it does not return a new object, just modifies the existing one |
Global context |