2018-09-20 20:23:31 +08:00
|
|
|
use na::{Real, U4};
|
|
|
|
|
2019-03-23 21:29:07 +08:00
|
|
|
use crate::aliases::{Qua, TVec};
|
2018-09-20 20:23:31 +08:00
|
|
|
|
2018-09-22 19:21:02 +08:00
|
|
|
/// Component-wise equality comparison between two quaternions.
|
2018-09-23 20:48:45 +08:00
|
|
|
pub fn quat_equal<N: Real>(x: &Qua<N>, y: &Qua<N>) -> TVec<bool, U4> {
|
2019-03-23 21:29:07 +08:00
|
|
|
crate::equal(&x.coords, &y.coords)
|
2018-09-20 20:23:31 +08:00
|
|
|
}
|
|
|
|
|
2018-09-22 19:21:02 +08:00
|
|
|
/// Component-wise approximate equality comparison between two quaternions.
|
2018-09-23 20:48:45 +08:00
|
|
|
pub fn quat_equal_eps<N: Real>(x: &Qua<N>, y: &Qua<N>, epsilon: N) -> TVec<bool, U4> {
|
2019-03-23 21:29:07 +08:00
|
|
|
crate::equal_eps(&x.coords, &y.coords, epsilon)
|
2018-09-20 20:23:31 +08:00
|
|
|
}
|
|
|
|
|
2018-09-22 19:21:02 +08:00
|
|
|
/// Component-wise non-equality comparison between two quaternions.
|
2018-09-23 20:48:45 +08:00
|
|
|
pub fn quat_not_equal<N: Real>(x: &Qua<N>, y: &Qua<N>) -> TVec<bool, U4> {
|
2019-03-23 21:29:07 +08:00
|
|
|
crate::not_equal(&x.coords, &y.coords)
|
2018-09-20 20:23:31 +08:00
|
|
|
}
|
|
|
|
|
2018-09-22 19:21:02 +08:00
|
|
|
/// Component-wise approximate non-equality comparison between two quaternions.
|
2018-09-23 20:48:45 +08:00
|
|
|
pub fn quat_not_equal_eps<N: Real>(x: &Qua<N>, y: &Qua<N>, epsilon: N) -> TVec<bool, U4> {
|
2019-03-23 21:29:07 +08:00
|
|
|
crate::not_equal_eps(&x.coords, &y.coords, epsilon)
|
2018-09-20 20:23:31 +08:00
|
|
|
}
|