COG Verb - VectorScale

Scales a vector by the given flex. If the vector has a length of one, the flex will become the length of the vector. Syntax:

 scalevec=VectorScale(vector, flex); 

The Math

 scalevec=(flex*x, flex*y, flex*z) 

Geometrical Application

Image:Vectorscale.gif

In this example, the length of the given vector is 1. And the given flex to scale the vector by is 2. Since 1 * 2 = 2, the length of the resultant vector will be 2.

  • Create:
This page was last modified 23:54, 2 April 2006.   This page has been accessed 234 times.