Top-rated recipes tagged "point" and "fast"http://code.activestate.com/recipes/tags/point+fast/top/2009-11-25T04:50:10-08:00ActiveState Code RecipesPython Vectors (Python)
2009-11-25T04:50:10-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/576908-python-vectors/
<p style="color: grey">
Python
recipe 576908
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/fast/">fast</a>, <a href="/recipes/tags/point/">point</a>, <a href="/recipes/tags/vector/">vector</a>).
Revision 3.
</p>
<p>This recipe implements vectors in pure Python and does not use "C" for speed enhancements. As a result, much effort has gone towards optimizing the instructions for the class methods. There are a few things that have yet to be improved, but it is being posted as an RFC. Comments on the structure, method names, and coding technique are requested for change. Once this code is standardized, work may commence on writing Vector3, Vector4, and VectorX. Please note that there is a difference between the "direction" and "degrees" properties.</p>