1. pygame
  2. pygame
  3. pygame
  4. Branches

Branches

math_module

View source
math_module
  • Contributors
    1. Loading...
Author Commit Message Date Builds
lorenz
merged changes from trunk
lorenz
some last minute changes before I merge to trunk. The biggest chunk is that I unified most math functions into a gerneric one as suggested by René Dudfield.
lorenz
added "lerp()" to Vector2 and Vector3 to provide a linear interpolation. fixed bug in "Vector2.slerp()". some cosmetic cleanups.
lorenz
implemented new methods in the math module. * added "vec1.slerp(vec2, steps)" to Vector2 and Vector3. This method returns an iterator. This can also scale in radial direction. * added "as_polar()" and "from_polar((r, phi))" to Vector2. This converts to and from polar-coordiantes where r is the radial distance and phi the angle to the positive x-axis. * added "as_spherical()" and "from_spherical((r, theta, phi))" to Vector3. T…
lorenz
rearanged math module. added forward declarations at the beginning. enable/disable_swizzling are now module methods added tests for Vector3 not yet complete (but almost)
lorenz
* implemented Vector3. there are no tests yet, so there are bound to be bugs
lorenz
refactored some of the vector tests. added more test for Vector2().elementwise()
lorenz
refactored the vector_elementwiseproxy functions and fixed some bugs along the way
lorenz
* added the vetor_elementwiseproxy which lets you apply calculations on each element. This also supports __pow__, __abs__ and __mod__ * added tests for the above
lorenz
added support for swizzling. added methods "enable_swizzle()" and "disable_swizzle()"; default: disabled added test for swizzling
lorenz
merged changes from trunk to math_module branch
lorenz
added methods distance_to and distance_squared_to to the vector class the vector class now supports the iter protocol added tests for the above
lorenz
added the following methods to Vector2 * length * length_squared * reflect * refelct_ip also included unit tests for the above
lorenz
updates to the pygame.math module * fixed vector_GetItem * implemented Get/SetSlice * fixed str/repr * updated the constructor so that "Vector2(Vector2().__repr__())" should work * implemented new methods: - rotate, rotate_ip - normalize, normalize_ip, is_normalized - cross - dot - angle_to - scale_to_length also added unit tests for all the above
lorenz
fix a reference counting bug in initmath which led to a crash fixed some unit tests for the math module fixed a C-API bug for the display module
lorenz
added an incomplete Vector2 to the math module. currently this revision does not work on my system.
lorenz
started writing tests for a yet to implement vector type
lorenz
* create math_module branch for development of vectors etc