Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Vector Arithmetic and Vector Drawings [5/10]

Arithmetic operator * can be used instead of the memeber function .mul to multiply vectors. However, not all combinations of types are allowed.

Operator * can multipliy a vector by a number, or a number by a vector. The result is a new vector. Points can not be multiplied.

Operator / can divide a vector by a number, where the vector is a left operand and the number is a right operand. The opposite is not allowed. Points can not be divided.

Uncomment the erroneous lines to see error descriptions.

Loading...