Revision [113]

This is an old revision of vectorcross made by ScripterAlex on 2009-01-10 18:36:53.
 
Usage

Syntax: vectorcross(array u, array v);
Returns the dot product of vector u and vector v.

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}.

vectordot is written as u•v and should not be mixed with u·v. What vectordot does, is that it returns a number. This number is the sum of products of each component of the vector.

u•v = <u1,u2,u3>•<v1,v2,v3> = u1·v1 + u2·v2 + u3·v3

Example

function onCreated() {
  temp.v = {3, 5, 7};
  temp.u = {9, 4, 2};

  temp.dot = vectordot(u, v);
}

... Will set temp.dot to 61

Categories

CategoryFunctionClientside
CategoryFunctionServerside

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

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
⚡ WEB1 (144.76.42.176) — Testing Environment ⚡