No description
Find a file
Brendan Zabarauskas 928e3323c1 Update .gitignore
2013-09-14 10:55:43 +10:00
src Impl comp_add and comp_mul using Array::zip 2013-09-14 10:54:19 +10:00
src-old Overhaul library, rename to cgmath 2013-08-26 15:08:25 +10:00
.gitignore Update .gitignore 2013-09-14 10:55:43 +10:00
AUTHORS Overhaul library, rename to cgmath 2013-08-26 15:08:25 +10:00
LICENSE Add license/copyright notices to source files 2013-06-01 08:01:01 +10:00
README.md Update README with more information 2013-09-03 15:13:10 +10:00

cgmath-rs

A linear algebra and mathematics library for computer graphics.

The library provides:

  • vectors: Vec2, Vec3, Vec4
  • points: Point2, Point3, Point4
  • square matricies: Mat2, Mat3, Mat4
  • a quaternion type: Quat
  • perspective projections
  • and more to come...?

Compilation

rustpkg build cgmath

Limitations

cgmath is not an n-dimensional library and is aimed at computer graphics applications rather than general linear algebra. It only offers the 2, 3, and 4 dimensional structures that are more than useful for most computer graphics applications. This design decision was made in order to simplify the implementation (Rust cannot paramerise over constants at compile time), and to make graphics-specific optimisations easier in the future. Those looking for n-dimensional mathematics can look to nalgebra.

Currently, operators are not overloaded. This is due to limitations in Rust's generics that will be fixed sometime in the future.

Contributing

Pull requests are most welcome, especially in the realm of performance enhancements and fixing any mistakes I may have made along the way. Unit tests and benchmarks are also required, so help on that front would be most appreaciated.