pasberth / python-vector

A module of Euclidean vector for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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'

About

A module of Euclidean vector for Python

License:Apache License 2.0


Languages

Language:Python 100.0%