Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can find the magnitude (the length) using the Pythagorean theorem. In a car game, you might need to find this value show show the speed of an object on the HUD display. 

...

The PVector class in processing has a method that returns this value: mag(); 

Normalising

A normalised vector or a unit vector has had its magnitude set to one, with the direction left unchanged. A unit vector shows us a direction alone, without a magnitude. Sometimes we are only interested in direction, and removing magnitude can make many calculations much simpler. 

...