Easy Vector

https://img.shields.io/pypi/v/easy_vector.svg https://img.shields.io/travis/DariusMontez/easy_vector.svg Documentation Status Updates

Vectors. Pure, Pythonic.

Quick-start

Some common things to do with vectors:

>>> from easy_vector import Vector as V
>>> vec = V(3, 4)
>>> print(vec)
Vector[3.000,4.000]
>>> vec.length
5.0
>>> vec[1] = 3
>>> print(vec)
Vector[3.000,3.000]
>>> vec.normal
Vector[0.707,0.707]
>>> vec.normal.angle
45.0

Features

  • pure Python
  • create from components, or magnitude and direction
  • auto-calculated normals, lengths and angles
  • declarative API using operator overloading
  • unlimited dimensions
  • operand type conversion

See usage for more details.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.