Revision [260]

This is an old revision of vectorcross made by ScripterAlex on 2009-01-13 16:12:55.
 
Usage

Syntax: vectorcross(array u, array v);
Returns a third vector.

Explanation

Vectors are often written as <x,y,z>, however in Graal they are written as arrays and often use these syntaxes: {x, y, z} or {x, y}.

Returns a third vector, which is perpendicular, or orthogonal, to the two vectors given as input.

For much more details about vectorcross, you can go here: Cross Product

Example

function onCreated() {
  temp.u = {1, 2, 3};
  temp.v = {3, 2, 0};
  
  temp.cross = vectorcross(u, v);
}

... Will set temp.cross to {-6, 9, -4}

Categories

CategoryFunctionClientside
CategoryFunctionServerside

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki