Commit Graph

20 Commits

Author SHA1 Message Date
Sébastien Crozet
2ccd62d558 Add methods to set the translation/rotation/transformation directly. 2013-09-06 08:48:08 +02:00
Sébastien Crozet
628066cdc8 Make DMat able to represent rectangular matrices.
The code is largely untested.
2013-09-05 00:01:52 +02:00
Sébastien Crozet
82ddda154f Update to work with the last compiler.
Because of the unfortunate changes on type parameters resolution:
        - the Dim trait now needs an useless parameter to infer the Self type.
        - ApproxEps::epsilon() is broken.
2013-08-28 14:22:12 +02:00
Sébastien Crozet
6999444575 Merge the Rotatable, Translatable, Transformable traits with their corresponding Rotation, Translation, Transformation. 2013-08-22 17:47:37 +02:00
Sébastien Crozet
347883caa1 Rework of the traits for Vectors.
The goal is to make traits less fine-grained for vectors, and reduce the amount of `use`.

- Scalar{Mul, Div} are removed, replaced by Mul<N, V> and Div<N, V>,
- Ring and DivisionRing are removed. Use Num instead.
- VectorSpace, Dot, and Norm are removed, replaced by the new, higher-level traits.

Add four traits:
- Vec: common operations on vectors. Replaces VectorSpace and Dot.
- AlgebraicVec: Vec + the old Norm trait.
- VecExt: Vec + every other traits vectors implement.
- AlgebraicVecExt: AlgebraicVec + VecExt.
2013-08-18 18:33:25 +02:00
Sébastien Crozet
cead4f8410 Moved DivisionRing to ring.rs. 2013-08-17 17:50:01 +02:00
Sébastien Crozet
61e985634b Fix FromIterator impl. 2013-08-16 10:14:01 +02:00
Sébastien Crozet
24e1862a9e Fix to work with the last Rust deriving. 2013-08-13 10:57:19 +02:00
Sébastien Crozet
3858c63291 Update to work with the last Rust api. 2013-08-11 16:07:34 +02:00
Sébastien Crozet
c59911168e Fix curly braces. 2013-08-05 10:13:44 +02:00
Sébastien Crozet
a810bf6008 Indentation fixes. 2013-08-05 09:44:56 +02:00
Sébastien Crozet
50b34ca765 Fix for loops (again) + iterate becomes range. 2013-08-03 12:21:56 +02:00
Sébastien Crozet
7b2dbb244e Fix for loops. 2013-08-02 10:50:04 +02:00
Sébastien Crozet
3f3f59e8eb Changed mod visibilities + add doc for types.rs 2013-08-01 18:55:42 +02:00
Sébastien Crozet
67dea17abe for ... advance -> foreach ... in 2013-08-01 09:18:21 +02:00
Sébastien Crozet
e75fe80966 Add documentation. 2013-07-24 16:50:40 +02:00
Sébastien Crozet
cf216f9b90 Removed occurences of copy/Copy + improved api.
Now, access to vector components are x, y, z, w, a, b, ... instead of at[i].
The method at(i) has the same (read only) effect as the old at[i].

Now, access to matrix components are m11, m12, ... instead of mij[offset(i, j)]...
The method at((i, j)) has the same effect as the old mij[offset(i, j)].

Automatic implementation of all traits the compiler supports has been added on the #[deriving]
clause for both matrices and vectors.
2013-07-20 15:07:49 +02:00
Sébastien Crozet
51fd2bc744 map -> iter().transform 2013-07-02 10:00:55 +00:00
Sébastien Crozet
8e8a87b667 Fixes to work with the new compiler. 2013-06-29 12:06:39 +00:00
Sébastien Crozet
c58e1ed40d Reorganized files. 2013-06-29 00:34:45 +00:00