in reply to Re: Rotate a 3D vectorin thread Rotate a 3D vector
Well, the quick-and-dirty way to do it is to scale your x component by cos(t) and your y component by sin(t). You might be happier with a matrix-based solution in the long run, though.
Edit: The math above is, of course, totally bogus. I plead momentary imbecility. johnnywang has the correct solution. D'oh!
What kind of program are you writing, btw?
Yours in pedantry,
"Lines of code don't matter as long as I'm not writing them." -- merlyn
No recent polls found