Game Development Reference
In-Depth Information
How to do it
Vectors can be used in multiple ways, few of them are listed as follows:
• Multiplying vectors is a cinch. You just multiply each component by the value. For
example, the vector V (4, 5) multiplied by 2 is (8, 10).
• The magnitude of a vector is its length. In the previous example, the magnitude of
the vector V (4, 5) is the distance from the start point to the point P(4, 5) which is
illustrated in the following figure:
This is easy to calculate using the Pythagorean theorem as follows:
magnitude =
If you had a three-dimensional vector, then you would use the similar equation:
magnitude =
Mathematicians place two vertical bars around a vector to denote its length, as
shown in the following:
Search WWH ::




Custom Search