nalgebra/nalgebra-glm/src/quat/quaternion_relational.rs

25 lines
817 B
Rust
Raw Normal View History

use na::{Real, U4};
use aliases::{Qua, Vec};
2018-09-22 19:21:02 +08:00
/// Component-wise equality comparison between two quaternions.
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.
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.
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.
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)
}