Skip to content

furushei/vector3d-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vector3D

If you want to perform vector or matrix operation with Python, numpy is a popular solution. However, in situations where numpy can not be used, this module will offer one of the alternative options.

Simple Usage

>>> from vector3d import Vector3D
>>> a = Vector3D(1, 2, 3)
>>> b = Vector3D(3, -1, 4)
>>> a + b
Vector3D(4, 1, 7)
>>> 2 * a
Vector3D(2, 4, 6)
>>> abs(a)
3.7416573867739413

Note: Vector3D class can also be used as 2D vector.

>>> Vector3D(3, 0) + Vector3D(0, 4)
Vector3D(3, 4)

About

A 3D vector class in pure Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages