This week in introduction to 3-D graphics programming I had to create vector class, which contains all functions that can be done with vectors. I have made a test program to show you the results.

Vector test program
To make this it wasn’t very hard as I’ve done my research into vectors. I had no serious problems with making the vector class just a few little simple errors to deal with. By doing this I have started to make 3-D renderer.
Dot Product
a vector can be multiplied by another vector. The dot product of A and B is a scalar that measures the tenancy of the two vectors to point in the same direction.
If A and B are perpendicular (normal at right angles to be a horizontal plane) then the dot product is zero.
The dot product or vector with itself is just the square of its length.
Cross product
Cross product of two vectors is a new vector, perpendicular (normal at right angle, to horizontal plane) to the plane of the two original vectors. Its length is the area of the parallelogram (a two-dimensional geometric figure formed of four sides in which both pairs of opposite sides are parallel and of equal length, and the opposite angles equal) formed by the original vectors.
Its direction is determined by the right-hand rule. The cross product measures the tendencies of the two vectors to be perpendicular and its one or more effective tools for describing, spinning and rotating objects.
Next week I make the matrix class for 3-D renderer.