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