/python-vector

A module of Euclidean vector for Python

Primary LanguagePythonApache License 2.0Apache-2.0

python-vector

A module of Euclidean vector for Python

How to use

from vector import vector
v1 = vector([1,3])
v2 = vector([3,-1])
print str(v1) # => [1,3]
print str(v1+v2) # => [4,2]
print str(v1-v2) # => [-2,4]
print str(v1*v2) # => 0
print abs(v1) # => 3.16227766017
# and so on.
# please read 'sample.py'