diff options
| author | Sébastien Crozet <developer@crozet.re> | 2020-10-27 09:57:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-27 09:57:26 +0100 |
| commit | 93153f5d93358e83c8a4ca2b7195bf9aae95ffb9 (patch) | |
| tree | 16ccb1aedc30d5c09d59e6ee5c7faa987e67b202 /src/utils.rs | |
| parent | f8acf6a5e9d3ba537dac6502b0e0541236b418c5 (diff) | |
| parent | ffbc3c02c7d328d5c48a3efb84d35f5911f1880b (diff) | |
| download | rapier-93153f5d93358e83c8a4ca2b7195bf9aae95ffb9.tar.gz rapier-93153f5d93358e83c8a4ca2b7195bf9aae95ffb9.tar.bz2 rapier-93153f5d93358e83c8a4ca2b7195bf9aae95ffb9.zip | |
Merge pull request #41 from dimforge/cylinder
Add cylinder and cone support + use a trait-object for shapes.
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs index ecdd4fd..a398a02 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -19,8 +19,10 @@ use { // pub(crate) const COS_10_DEGREES: f32 = 0.98480775301; // pub(crate) const COS_45_DEGREES: f32 = 0.70710678118; // pub(crate) const SIN_45_DEGREES: f32 = COS_45_DEGREES; +#[cfg(feature = "dim3")] +pub(crate) const COS_1_DEGREES: f32 = 0.99984769515; pub(crate) const COS_5_DEGREES: f32 = 0.99619469809; -#[cfg(feature = "dim2")] +// #[cfg(feature = "dim2")] pub(crate) const COS_FRAC_PI_8: f32 = 0.92387953251; #[cfg(feature = "dim2")] pub(crate) const SIN_FRAC_PI_8: f32 = 0.38268343236; @@ -91,7 +93,7 @@ impl<N: Scalar + Copy + WSign<N>> WSign<Vector3<N>> for Vector3<N> { impl WSign<SimdFloat> for SimdFloat { fn copy_sign_to(self, to: SimdFloat) -> SimdFloat { - self.simd_copysign(to) + to.simd_copysign(self) } } |
