Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Operations on Vectors [6/13]

This demonstrational program illustrates the use of unit vectors. Since a unit vector has a length of 1, which is too small to draw, this program draws a unit vector multiplied by a number 100, which always produces a vector of length 100.

The operation of creating a unit vector is not entirely exact. It is generally impossible to exactly compute a unit vector when the number of digits in the computation is finite. Therefore, the calculated unit vector and the vector of length 100 are the approximations of the exact result.

Loading...