nalgebra/nalgebra-glm/src/gtx/vector_angle.rs

20 lines
470 B
Rust
Raw Normal View History

use na::{DefaultAllocator, Real};
use traits::{Dimension, Alloc};
use aliases::TVec;
/// The angle between two vectors.
pub fn angle<N: Real, D: Dimension>(x: &TVec<N, D>, y: &TVec<N, D>) -> N
where DefaultAllocator: Alloc<N, D> {
x.angle(y)
}
2018-09-23 20:41:56 +08:00
//pub fn oriented_angle<N: Real>(x: &TVec2<N>, y: &TVec2<N>) -> N {
// unimplemented!()
//}
//
2018-09-23 20:41:56 +08:00
//pub fn oriented_angle_ref<N: Real>(x: &TVec3<N>, y: &TVec3<N>, refv: &TVec3<N>) -> N {
// unimplemented!()
//}