Shane Pearman
af127633cc
Replace use of BaseFloat/Float with BaseNum/Num where possible
2021-08-11 12:07:57 -04:00
Rémi Lauzier
df218547d1
Fix some clippy warnings and some typo
2021-06-16 14:09:50 -04:00
Bryce Besler
3e93bac9f5
Simplify "fold_array" macro ( #527 )
2021-04-06 10:06:21 -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
753773cfcd
Further relax InnerSpace and is_finite BaseFloat bounds
2020-05-23 00:50:32 -04:00
Andrea Catania
ff1cda766d
Code formatted with
2019-11-05 07:16:38 +01:00
Norbert Nemec
7290d42c04
split off code into vector_simd.rs
2019-09-01 21:04:05 +02:00
Norbert Nemec
dfb8766e38
drop redundant impl_vector_default
2019-09-01 21:04:05 +02:00
Norbert Nemec
c4acb79d04
merge default_fn!() from impl_vector_default back into impl_vector
2019-09-01 21:04:05 +02:00
Norbert Nemec
64fde2002b
replace default -> default_fn!()
2019-09-01 21:04:04 +02:00
Norbert Nemec
caa8ee13fd
merge changes from impl_vector to impl_vector_default
2019-09-01 21:04:04 +02:00
Norbert Nemec
40d0afd036
drop redundant impl_scalar_ops_default
2019-09-01 21:04:04 +02:00
Norbert Nemec
1c7c889921
drop redundancy of impl_operator_default and impl_assignment_operator_default
2019-09-01 21:04:04 +02:00
Norbert Nemec
935f389983
replace deprecated try! macro by ? operator
2019-09-01 15:16:03 +02:00
Mick van Gelderen
a63843c30a
Implement zip for VectorN and PointN
...
Impelements #485
2019-06-10 10:51:30 +02:00
Lukas Kalbertodt
4bd8ebb38d
Make rand
dependency optional (but enabled by default)
...
Most users probably don't use the rand impls, so the `rand` crate pulls
a large number of dependencies into the dependency tree which is just
wasted compilation time.
2019-05-02 11:24:50 +02:00
Nathan Stoddard
2cf020351e
Add short constructors for points, to match the ones for vectors
2019-01-14 15:53:28 -08:00
Nathan Stoddard
19f75b88e6
Declare point constructors to be const
...
Also add const to a vector constructor that I missed before.
Constructors for other types can't yet be const, because the compiler gives an error: "trait bounds other than `Sized` on const fn parameters are unstable".
2019-01-12 19:59:44 -08:00
Nathan Stoddard
9a20f1031c
Declare vector constructors to be const
...
This makes it easier to create vectors in constants.
2019-01-12 14:53:20 -08:00
Victor Koenders
bd88d9e93f
Fixed a compiler issue with the 'simd' feature
2018-06-08 14:35:12 +02:00
Victor Koenders
cdb0e8c8a1
Bumped rand and fixed compiler issues
2018-06-08 13:39:02 +02:00
Alex Butler
a3965d414d
Update approx -> 0.2
2018-05-23 12:43:52 +01:00
Richard Dodd
2a7e2ebda3
Fix simd
2018-04-29 17:04:49 +01:00
Richard Dodd
f8e92ed327
Add is_finite to array and quaternion
2018-04-29 14:21:42 +01:00
Richard Dodd
f82e421e2c
Fix for simd
2018-04-28 15:09:45 +01:00
Richard Dodd
4fede94df5
Add is_finite method to vectors and matrices.
...
This method is useful in debug to error early when some kind of
singularity is encountered.
2018-04-28 11:34:45 +01:00
Osspial
def53ca371
Fix some documentation
2018-03-16 16:32:46 -04:00
Osspial
34da833e39
Add map functions to points and vectors
2018-01-20 23:54:59 -05: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
Aceeri
fe8ec2beb9
Fix docs for unit_z on Vector3
2017-12-03 17:57:37 -08:00
Egor Larionov
76f00b7941
Extend swizzles to increase the dimension of a vector.
...
For example this is now valid:
```
let p2 = Point2::new(1.0, 2.0);
let p3 = p2.xyx(); // producing Point3 { x:1.0, y:2.0, z:1.0 }
```
2017-09-30 15:09:03 -07:00
Egor Larionov
cc7047555d
Complete the list of generated swizzle operators.
2017-09-30 14:41:17 -07:00
Osspial
bd1b2667bd
Fix building with SIMD enabled
2017-08-16 16:47:45 -04:00
Osspial
a6abd5bf02
Modify cast() functions to return Option
2017-08-16 16:21:51 -04:00
Osspial
1e98ef4dd4
Add Bounded impl for Vectors and Points
2017-08-08 19:11:14 -04:00
harrison
42cb73de8e
fixed len for simd
2017-07-31 16:54:40 -04:00
harrison
9b84d804ae
added len function to Array
2017-07-31 16:13:15 -04:00
Dzmitry Malyshau
d72fc08826
Mint flavour
2017-06-06 18:07:38 -04:00
Dzmitry Malyshau
7a21125c55
Refined serde dependencies
2017-06-06 16:48:55 -04:00
Dzmitry Malyshau
087336d0c0
Refinded simd feature
2017-06-06 16:44:13 -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
Brendan Zabarauskas
78555ec780
Drop rustc-serialize support
...
According to [Rust release milestone predictions](https://internals.rust-lang.org/t/rust-release-milestone-predictions/4591?u=dtolnay ), rustc-serialize is scheduled to be deprecated in next month's beta release of Rust.
Closes #395
2017-04-16 16:35:24 +10:00
Dimitri Sabadie
06bf49eee5
Added dots at end of some phrases.
2017-03-21 00:10:38 +01:00
Luxko
194c4770e9
add basic SIMD support for Quaternion<f32>
2017-03-12 20:44:58 +08:00
Luxko
d45536f1bd
Clean up a bit
2017-02-25 07:42:15 +08:00
Luxko
64924b954d
[WIP]Add basic SIMD support
...
- Add an opt-in SIMD support for the module. The feature requires crate
`simd` and specialization, thus can only be enabled under nightly. Under
the given benchmark certain operations were able to be up to 60% faster.
Currently the supported types as well as operations are highly limited.
- Clean up some deadly tests. Also add new tests for SIMD.
2017-02-25 07:26:11 +08:00