Commit graph

36 commits

Author SHA1 Message Date
Shane Pearman
2387544e08 bump rand -> 0.7, fix unused macro warnings in tests 2019-08-11 16:59:47 -07:00
Nathan Stoddard
2cf020351e Add short constructors for points, to match the ones for vectors 2019-01-14 15:53:28 -08:00
Brendan Zabarauskas
574dd3b972 Run rustfmt on most files 2018-01-03 13:16:40 +11:00
Brendan Zabarauskas
3543ac0274 Merge pull request #427 from Osspial/cast_option
Modify cast functions to return Option
2017-08-22 19:32:57 +10:00
Matthew Plant
bc9c5b7f79 Added project_on to InnerSpace 2017-08-21 13:47:15 -07:00
Osspial
a6abd5bf02 Modify cast() functions to return Option 2017-08-16 16:21:51 -04:00
Brendan Zabarauskas
b6199ca702 Remove PartialOrd
Closes #396

This removes `PartialOrd` and makes `BaseNum` and `BaseFloat` simple trait aliases. This should allow more types to be used as parameters in the cgmath data types at the expense of removing `Array::min` and `Array::max`.
2017-05-06 17:12:52 +10:00
Brendan Zabarauskas
77260934a1 Clean up Sum and Product impls
This is for consistency with other impls
2017-04-26 21:56:02 +10:00
Ben Boeckel
240559b941 iter traits: impl iter::{Sum, Product}
This adds `Sum` trait for the `MatrixN`, `VectorN`, `Quaternion`
structures and the `Product` trait for `MatrixN`, `BasisN` and
`Quaternion`.

It also add constraints on the `Rotation` and `SquareMatrix` to require
the `Product` trait and `VectorSpace` to require `Sum`.
2017-04-25 11:01:18 -04:00
Andrew Dudney
0f8a96d9b8 Changed over to the approx crate. Currently breaks rotation's doc tests. 2016-08-22 09:21:22 -06:00
Andrew Dudney
3d3b9c96ca Moved angle types to tuple structs 2016-07-31 20:40:31 -07:00
Brendan Zabarauskas
2cd6f402df Move the dot method onto EuclideanVector
The Vector and EuclideanVector traits roughly line up with the concept of vector spaces and inner spaces respectively. It makes more sense to group `dot` with the other methods that depend on it.
2016-04-04 20:45:37 +10:00
Brendan Zabarauskas
0de8942748 Merge pull request #311 from bjz/rename-vector-length
Rename Vector::length to Vector::magnitude
2016-03-28 13:47:50 +11:00
Brendan Zabarauskas
f7bc6dcc54 Rename Vector::length to Vector::magnitude 2016-03-27 16:17:11 +11:00
Brendan Zabarauskas
8d10f1dc6d Remove extraneous operator overloads on vectors, and add Elementwise trait 2016-03-26 13:28:49 +11:00
Cameron Hart
1e6f615f9e Split arithmetic operator tests into per op tests 2016-01-02 09:12:13 +11:00
Cameron Hart
62b6c961a4 Test by-ref arithmetic operators against by-val results 2016-01-02 08:57:16 +11:00
Cameron Hart
043a63c45a Expand vector aritmetic operator tests
Add test for vector on vector operators and different permutations
of vector references.
2016-01-02 00:18:48 +11:00
Cameron Hart
7426d8d807 Support for scalar on the lhs of arithmetic operators 2016-01-01 18:05:32 +11:00
Brendan Zabarauskas
43634f0b49 Remove more *_self methods from Vector trait 2015-12-13 12:01:00 +11:00
Brendan Zabarauskas
25ca567060 Move element-wise operations into Array1 trait 2015-11-14 12:17:03 +11:00
Brendan Zabarauskas
178272da3d Make lots of methods take vectors and points by value 2015-11-09 20:18:02 +11:00
Brendan Zabarauskas
af38e8a8be Rename comp_{add, mul} to {sum, product} 2015-10-01 18:52:55 +10:00
Brendan Zabarauskas
4be95bcb7d Remove {Array1, Array2}::map method
This doesn't seem to be used anywhere - not sure how useful it is. It isn't really a proper `map` anyway, because it mutates `self`.
2015-09-29 09:47:57 +10:00
Dzmitry Malyshau
498df01729 Fixed all the warnings, compile issues, and tests 2015-04-04 22:31:18 -04:00
Jonathan Neuschäfer
4c527f8334 s/AUTHORS file/Cargo.toml file/ 2015-03-18 17:51:03 +01:00
Colin Sherratt
146a64cc1b fix is->isize in vector 2015-03-15 16:54:38 -04:00
Dzmitry Malyshau
bf257a3e49 Added ToComponents. Moved from_value into . 2015-03-01 01:05:22 -05:00
Colin Sherratt
662c7d7f68 cleanup some warnings around features 2015-02-08 13:36:33 -05:00
Dzmitry Malyshau
6ecbf2dbfd Implemented short vector constructors 2015-02-06 23:03:00 -05:00
Colin Sherratt
c7270a9077 Update to latest rustc 2015-01-07 15:34:42 -07:00
Jameson Ernst
12ec7318d0 Remove deprecated Float use from tests. 2014-11-24 20:24:04 -08:00
Eduard Bopp
4d2fb64482 Type-cast a vector component-wise
This allows one to e.g. cast a vector of f64s to an equivalent vector of f32s.
More generally this is allowed for arbitrary NumCast types.
2014-11-20 16:41:27 +01:00
Brendan Zabarauskas
1371f75165 Update for rustc 0.13.0-nightly
There are still some deprecation errors in the doc tests left
2014-11-16 01:59:43 +11:00
Brendan Zabarauskas
379dc499ec Publicly re-export everything from the root crate
Closes #100
2014-08-16 14:53:54 +10:00
Brendan Zabarauskas
8e5500d581 Switch to cargo 2014-08-11 16:15:14 +10:00
Renamed from src/test/vector.rs (Browse further)