Rémi Lauzier
df218547d1
Fix some clippy warnings and some typo
2021-06-16 14:09:50 -04:00
josh65536
816c043223
Fixed opposite quaternion slerp bug ( #515 )
...
* Fixed opposite quaternion slerp bug
* Removed an unnecessary
* nlerp and slerp always take the shortest path now
2020-08-11 23:04:27 -04:00
Nathan Stoddard
8d0e3f4eae
Remove Float bound from MetricSpace and InnerSpace; move Float bound to individual methods
...
This makes it possible to call methods like `dot` on integers.
2020-06-03 16:07:04 -04:00
Egor Larionov
9dcd9fc3dd
Remove unused commented out code
2020-05-23 00:50:32 -04:00
Egor Larionov
753773cfcd
Further relax InnerSpace and is_finite BaseFloat bounds
2020-05-23 00:50:32 -04:00
Egor Larionov
b9e82914db
Relax Float bound {Metric,Inner}Space and Matrix traits
...
This makes the trait more flexible.
This contributes to #496 .
2020-05-23 00:50:32 -04:00
Andrea Catania
ff1cda766d
Code formatted with
2019-11-05 07:16:38 +01:00
Ben Boeckel
2d2c501074
Angle: add the normalize_signed method
...
This method is like `normalize` except that it normalizes to have an
absolute value of no more than `turn_div_2`.
2019-01-16 16:01:46 -05:00
Vlad Shcherbina
5512b6a0f7
[breaking] Move lerp() from InnerSpace to VectorSpace
...
Because it does not require dot product.
Along the way, fix the comment.
Fixes #471 .
2018-11-22 17:43:21 +03:00
Alex Butler
a3965d414d
Update approx -> 0.2
2018-05-23 12:43:52 +01:00
Richard Dodd
f8e92ed327
Add is_finite to array and quaternion
2018-04-29 14:21:42 +01:00
Brendan Zabarauskas
574dd3b972
Run rustfmt on most files
2018-01-03 13:16:40 +11:00
Brendan Zabarauskas
68b9052be1
Remove experimantal must_use annotations
2018-01-03 12:41:43 +11:00
Brendan Zabarauskas
43a6b2be8c
Merge pull request #426 from Osspial/point_ops
...
Add vector subtraction for all points
2017-10-23 23:11:41 +11:00
Brendan Zabarauskas
bba6285f4d
Merge pull request #420 from DataAnalysisCosby/master
...
Added project_on to InnerSpace
2017-08-22 19:31:07 +10:00
Matthew Plant
bc9c5b7f79
Added project_on to InnerSpace
2017-08-21 13:47:15 -07:00
Osspial
b2b715c020
Add vector subtraction bound to EuclideanSpace
2017-08-10 18:50:11 -04:00
Osspial
66ee40e4c7
Re-export num_traits::Bounded
2017-08-09 23:47:35 -04:00
harrison
9b84d804ae
added len function to Array
2017-07-31 16:13:15 -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
ff2d15e0ff
Implement Sum for Angle
2017-04-26 21:56:02 +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
65e744c8cd
Remove self inversion methods
2016-05-10 21:55:11 +10:00
Mark Hintz
c8b1d4b498
Minor documentation fix - cotangent and secant were swapped
2016-04-27 17:10:57 +02:00
Brendan Zabarauskas
6b48236cb6
Inherit Zero and One for core structural traits
2016-04-25 15:26:56 +10:00
Brendan Zabarauskas
54adacc2a8
Re-export Zero and One via structure module
2016-04-25 11:43:28 +10:00
Brendan Zabarauskas
bb4ebbdd76
Add midpoint and centroid functions
2016-04-24 13:54:29 +10:00
Brendan Zabarauskas
8795b179d7
Add MetricSpace trait for calculating distances
2016-04-23 19:58:34 +10:00
Brendan Zabarauskas
86c13ca14f
Switch to using num_traits crate from num
...
Fixes #336
2016-04-23 14:03:35 +10:00
Brendan Zabarauskas
8dd2874b59
Move traits into common module
2016-04-19 20:51:40 +10:00