Commit graph

915 commits

Author SHA1 Message Date
Sébastien Crozet 0bbefed4bc Improve the benchmark suite.
As a side effect, this adds `Rand` deriving to the benchmarked strucures.
2014-11-07 16:23:10 +01:00
Sébastien Crozet 11137f823d Merge branch 'cargo_for_benchmarks' of git://github.com/aepsil0n/cgmath-rs 2014-11-07 12:31:34 +01:00
Brendan Zabarauskas 6611456791 Merge pull request #137 from Darkspear7/master
Fix for orthographic projection and removed constraints on input
2014-11-04 06:14:53 +11:00
Darkspear7 7ae16b3423 Removed constraints on ortographic projection function to allow bigger values for left, bottom, near than right, top, far. 2014-11-03 15:50:27 +02:00
Brendan Zabarauskas 08c02bf04f Merge pull request #136 from tomaka/master
fail! -> panic!
2014-10-30 20:12:24 +11:00
Tomaka17 4fcfde13de fail! -> panic! 2014-10-30 10:11:33 +01:00
Brendan Zabarauskas 498fb60281 Merge pull request #132 from aepsil0n/approx_eq_macros
Assertion macros for approximate equality
2014-10-23 22:07:25 +11:00
Brendan Zabarauskas d2cd97d694 Merge pull request #133 from aepsil0n/readme_update
Update README.md to reflect item name changes
2014-10-23 22:05:55 +11:00
Eduard Bopp 3e73403ca2 Adapt Travis CI integration to benchmark change 2014-10-23 11:30:59 +02:00
Eduard Bopp 549aea6427 Use Cargo to run the benchmarks
Naming the benchmark folder benches instead of bench lets Cargo run the
benchmarks one by one like the test suite. The directory structure was modified
accordingly also getting rid of the now superfluous files.
2014-10-23 11:15:27 +02:00
Eduard Bopp c5b65ea93d Update README.md to reflect item name changes
There were some outdated names presented in the readme. Fixes #128.
2014-10-23 10:30:33 +02:00
Eduard Bopp 666bb56670 Assertion macros for approximate equality
For sake of readability and consistency with the standard library macros
assert! and assert_eq!, the macros assert_approx_eq! and assert_approx_eq_eps!
have been implemented based on the ApproxEq trait.

Upon failure these macros yield readable error messages including the input
values and the tolerance (epsilon) used to determine their approximate
equality.

Resolves #131.
2014-10-23 10:22:34 +02:00
Brendan Zabarauskas f514fb2883 Merge pull request #130 from csherratt/master
Added to_euler.
2014-10-14 12:14:59 +11:00
Colin Sherratt 0f0b960211 Added to_euler which allows moving from to and from euler coordinates.
I did not have much luck getting the old from_eular logic work the way I
expected so I updated the implementation to match my sources.

I believe this changed the order of the axis, I am unsure of what they were
before.
2014-10-13 21:05:49 -04:00
Brendan Zabarauskas d981c349a0 Merge pull request #127 from csherratt/master
Fix ortho projection matrix
2014-10-06 17:41:24 +11:00
Colin Sherratt aae8747595 Fix ortho projection matrix 2014-10-04 20:12:09 -04:00
Corey Richardson d2053a8366 Merge pull request #124 from tomaka/master
Update for rustc 0e784e168 2014-09-16 23:26:11 +0000
2014-09-18 10:45:40 -04:00
Tomaka17 1b5da61ccb Update for rustc 0e784e168 2014-09-16 23:26:11 +0000 2014-09-18 16:19:26 +02:00
Brendan Zabarauskas 9ade4ce92d Merge pull request #123 from HeroesGrave/master
Updated to latest Rust
2014-08-30 23:32:13 +10:00
HeroesGrave 896735a2b0 updated to latest Rust 2014-08-30 12:00:34 +12:00
kvark 2163d7b0a5 Merge pull request #120 from jeannekamikaze/master
Create Plane from point and normal.
2014-08-26 12:00:29 -04:00
Jeanne-Kamikaze 6f0573c79a Added 'from_point_normal' 2014-08-26 17:08:24 +02:00
Brendan Zabarauskas e54265cb61 Merge pull request #118 from bachm/master
Implemented Encodable, Decodable
2014-08-23 23:00:23 +10:00
bachm 825f5f2975 deriving Encodable, Decodable for all structs 2014-08-23 14:34:33 +02:00
Corey Richardson eaba571886 Merge pull request #116 from Ogeon/master
Removed duplicate Aabb3 re-export
2014-08-18 22:25:57 -04:00
Erik Hedvall cd5cdeacbf Removed duplicate Aabb3 re-export 2014-08-18 15:05:25 +02:00
Corey Richardson 62cbb44e1c Merge pull request #115 from bjz/re-export
Publicly re-export everything from the root crate
2014-08-16 01:14:39 -04:00
Brendan Zabarauskas 379dc499ec Publicly re-export everything from the root crate
Closes #100
2014-08-16 14:53:54 +10:00
Brendan Zabarauskas a010ddee54 Merge pull request #82 from brandonw/add-intersection-impls
Update intersection impls
2014-08-15 21:29:22 +10:00
Brandon Waskiewicz 4f17d73f23 Add Ray2<>Aabb2 intersection impl 2014-08-13 20:51:51 -04:00
Brandon Waskiewicz 814b845de7 Update line intersection
*Change line<>line intersection to be ray<>line.
*Update tests accordingly
*Clean up and simplify intersection logic
2014-08-13 20:51:44 -04:00
Corey Richardson 4a45bf3b53 Merge pull request #114 from bjz/array-stuff
Array stuff
2014-08-11 08:16:51 -04:00
Brendan Zabarauskas 3ff1eb583f Add fixed-length array conversions
Closes #111

`FixedArray::from_fixed` cannot yet be implemented due to  rust-lang/rust#16418
2014-08-11 21:10:38 +10:00
Brendan Zabarauskas f93963919a Transition codebase to the new method names 2014-08-11 18:55:14 +10:00
Brendan Zabarauskas 325ebad75e Use more self-explanatory names for indexing methods 2014-08-11 17:02:25 +10:00
Brendan Zabarauskas 8999d88216 Remove deprecated functions from array traits 2014-08-11 16:54:39 +10:00
Brendan Zabarauskas 9aec9fb279 Merge pull request #113 from bjz/bench
Build benchmarks on travis
2014-08-11 16:32:51 +10:00
Brendan Zabarauskas ce674a9802 Build benchmarks on travis 2014-08-11 16:28:50 +10:00
Brendan Zabarauskas 6f5638c93e Merge pull request #112 from bjz/cargo
Switch to cargo
2014-08-11 16:17:40 +10:00
Brendan Zabarauskas 8e5500d581 Switch to cargo 2014-08-11 16:15:14 +10:00
Brendan Zabarauskas 5c07e8a421 Merge pull request #110 from ZeronSix/scale
Added Matrix3::from_diagonal
2014-08-10 06:10:07 +10:00
Vyacheslav Zeronov 535b5aa01f Added Matrix3::from_diagonal
Useful for creation of scale matrices.
2014-08-08 13:46:25 +06:00
Brendan Zabarauskas 38364a6439 Merge pull request #109 from atheriel/rot-fix
Fix `Matrix2::from_angle()` invocation and add a test for the feature.
2014-08-06 22:03:26 +10:00
Aaron Jacobs bfc8efff80 Fixes Matrix2::from_angle invocation and adds a test for the feature.
Signed-off-by: Aaron Jacobs <atheriel@gmail.com>
2014-08-05 22:28:03 -07:00
Corey Richardson e9a1723ef4 Merge pull request #106 from atheriel/vecdocs
Add a tutorial of sorts for working with cgmath's vectors.
2014-08-03 04:29:49 -07:00
Corey Richardson 0189aeadad Merge pull request #107 from bjz/index-operators
Deprecate element and column accessors in favour of index operators
2014-07-29 15:38:47 -07:00
Brendan Zabarauskas 1e1f60379e Deprecate element and column accessors in favour of index operators
Also removes some unnecessary `clone` calls.
2014-07-30 04:06:31 +10:00
Brendan Zabarauskas f5cb1fb8e4 Merge pull request #105 from atheriel/vec_ops
Actually implement division, remainder, and index operators for vectors.
2014-07-30 02:19:03 +10:00
Aaron Jacobs 5c25683cfb Adds a tutorial of sorts for working with cgmath's vectors.
There are several runnable code examples that should compile when
using `make doctest`.

Signed-off-by: Aaron Jacobs <atheriel@gmail.com>
2014-07-28 23:05:15 -07:00
Aaron Jacobs fddb3a7903 Implements the (mutable) index operator for vectors.
Again, this is possibly an oversight. The operators simply use the
mut_i() and i() methods which are demanded by the Array1<S> trait.

This means you may access the field `x` on a VectorN with vector[0]
syntax.

Signed-off-by: Aaron Jacobs <atheriel@gmail.com>
2014-07-28 22:37:49 -07:00