Programming for Kids - ZedLX

The Easiest Way to Learn Computer Programming, for Free

Operations on Vectors [2/14]

The getter function .mul from type vector2D multiplies a vector by a number. The number is given as the argument.

A vector is multiplied by multiplying all its coordinate components.

The multiplication operation multiplies the vector's length.

Points cannot be multiplied by a number, because such an operation has no sense. Therefore, the type point2D does not have a getter function .mul.