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  +  Vector addition
 Vector  -  Vector subtraction
 Vector  *  scalar multiplication
 Vector  /  scalar division


include ..\Utilitys.pmt
 
def add + enddef
def sub - enddef
def mul * enddef
def div / enddef
 
def opVect  /# a b op -- a b c #/
    var op
    list? not if swap len rot swap repeat endif
    len var lon
 
    ( lon 1 -1 ) for var i
        i get rot i get rot op exec >ps swap
    endfor
 
    lon for drop
        ps>
    endfor
 
    lon tolist
enddef
 
( 5 7 ) ( 2 3 )
 
getid add opVect ?
getid sub opVect ?
drop 2
getid mul opVect ?
getid div opVect ?