Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

The type vector2D [3/11]

It is possible to convert a point to a vector and reverse. The getter .v from type point2D returns the corresponding vector. This vector has coordinate components equal the coordinates of the point.

A vector obtained in this manner is called a position vector or a radius vector.

Reversely, the getter .p from type vector2D returns the corresponding point.

An important difference between points and vectors is that a vector has length .len. Of course, points do not have lengths, since such a concept does not make any sense.

Loading...