RosettaCodeData/Task/Vector/00-TASK.txt

17 lines
555 B
Plaintext

;Task
Implement a Vector class (or a set of functions) that models a Physical Vector. The four basic operations and a ''pretty print'' function should be implemented.
The Vector may be initialized in any reasonable way.
* Start and end points, and direction
* Angular coefficient and value (length)
The four operations to be implemented are:
* Vector <big><b> + </b></big> Vector addition
* Vector <big><b> - </b></big> Vector subtraction
* Vector <big><b> * </b></big> scalar multiplication
* Vector <big><b> / </b></big> scalar division
<br><br>