f64 types have no PartialEq
LoganDark opened this issue · 1 comments
LoganDark commented
It seems PartialEq is not implemented for the f64 types!
However, the f32 types do have PartialEq, so what gives?
Example:
rotor3s!(
Rotor3 => (Mat3, Vec3, Bivec3, f32),
Rotor3x4 => (Mat3x4, Vec3x4, Bivec3x4, f32x4),
Rotor3x8 => (Mat3x8, Vec3x8, Bivec3x8, f32x8)
);
impl std::cmp::PartialEq for Rotor3 {
fn eq(&self, other: &Self) -> bool {
self.s == other.s && self.bv == other.bv
}
}
#[cfg(feature = "f64")]
rotor3s!(
DRotor3 => (DMat3, DVec3, DBivec3, f64),
DRotor3x2 => (DMat3x2, DVec3x2, DBivec3x2, f64x2),
DRotor3x4 => (DMat3x4, DVec3x4, DBivec3x4, f64x4)
);
// No PartialEq for DRotor3? Come to think of it, DBivec3 doesn't have one either, even though Bivec3 does...
Should I PR? Was this an oversight or an intentional decision?
fu5ha commented
Oversight, PR welcome :)
…On Fri, Oct 16, 2020, 4:06 AM LoganDark ***@***.***> wrote:
It seems PartialEq is not implemented for the f64 types!
However, the f32 types *do* have PartialEq, so what gives?
Example:
rotor3s!(
Rotor3 => (Mat3, Vec3, Bivec3, f32),
Rotor3x4 => (Mat3x4, Vec3x4, Bivec3x4, f32x4),
Rotor3x8 => (Mat3x8, Vec3x8, Bivec3x8, f32x8)
);
impl std::cmp::PartialEq for Rotor3 {
fn eq(&self, other: &Self) -> bool {
self.s == other.s && self.bv == other.bv
}
}
#[cfg(feature = "f64")]rotor3s!(
DRotor3 => (DMat3, DVec3, DBivec3, f64),
DRotor3x2 => (DMat3x2, DVec3x2, DBivec3x2, f64x2),
DRotor3x4 => (DMat3x4, DVec3x4, DBivec3x4, f64x4)
);
// No PartialEq for DRotor3? Come to think of it, DBivec3 doesn't have one either, even though Bivec3 does...
Should I PR? Was this an oversight or an intentional decision?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#82>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGYXH7K5TU764ZXFR2B6TDSLASLHANCNFSM4STGEURQ>
.