Converting movement vector to dir vector and magnitude

Started by
0 comments, last by joanusdmentia 17 years, 6 months ago
How would you convert a movement vector to a directional vector and a magnitude (speed)? I know just normalizing it would give you the directional vector, but how would you extract the speed out of it? Thanks in advance
Advertisement
For a 3D vector

magnitude = sqrt(x*x + y*y + z*z);

Drop the z*z for a 2D vector, add a w*w for a 4D vector. This extends to any number of dimensions.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V

This topic is closed to new replies.

Advertisement