Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Rotate a 3D vector

by Anonymous Monk
on Apr 28, 2010 at 23:02 UTC ( #837410=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    float distance = sqrt(v.x*v.x + v.y*v.y + v.z*v.z);
    v.x = v.x/distance;
    v.y = v.y/distance;
    v.z = v.z/distance;
    
  2. or download this
    float dotProduct = Va.x*Vb.x + Va.y*Vb.y + Va.z*Vb.z;
    
  3. or download this
    acos(dotProduct);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://837410]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2020-11-27 03:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?