how to lengthen a vector?
how do i lengthen a vector with an int or float
[edited by - CondiS on July 3, 2002 3:45:36 PM]
July 03, 2002 02:50 PM
You multiply all of the components of the vector by the scalar (int or float).
I would suggest normalizing the vector first, or making sure it is of length ''1''. Most all graphics APIs have a vector normalization function.
I would suggest normalizing the vector first, or making sure it is of length ''1''. Most all graphics APIs have a vector normalization function.
Vector V;int scalar = 10;V.x = 1;V.y = 0;V.z = 0;V.x = V.x * scalar;V.y = V.y * scalar;V.z = V.z * scalar;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement