Difference between revisions of "C++:3D Exercises"
(→Normalise a vector)
|Line 1:||Line 1:|
|Line 308:||Line 309:|
Latest revision as of 12:12, 25 November 2011
Calculate the dot product of two vectors. Fill in the details in the function dotproduct
Wikipedia includes a good article on dot products. http://en.wikipedia.org/wiki/Dot_product#Definition
Calculate the cross product of two vectors. Fill in the details in the function crossproduct
Wikipedia includes a good article on cross products. http://en.wikipedia.org/wiki/Cross_product#Coordinate_notation
Calculate the magnitude of a vector. Fill in the details in the function length
Normalise a vector
Normalise the given vector. The direction should be the same, the length should be 1.