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

19 lines
465 B
Rust
Raw Normal View History

use na::{DefaultAllocator, Real};
use aliases::TVec;
2018-10-22 04:11:27 +08:00
use traits::{Alloc, Dimension};
/// The angle between two vectors.
pub fn angle<N: Real, D: Dimension>(x: &TVec<N, D>, y: &TVec<N, D>) -> N
2018-10-22 13:00:10 +08:00
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!()
//}