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

21 lines
504 B
Rust
Raw Normal View History

2019-03-25 18:21:41 +08:00
use na::{DefaultAllocator, RealField};
2019-03-23 21:29:07 +08:00
use crate::aliases::TVec;
use crate::traits::{Alloc, Dimension};
/// The angle between two vectors.
2019-03-25 18:21:41 +08:00
pub fn angle<N: RealField, D: Dimension>(x: &TVec<N, D>, y: &TVec<N, D>) -> N
2020-04-06 00:49:48 +08:00
where
DefaultAllocator: Alloc<N, D>,
{
x.angle(y)
}
2019-03-25 18:21:41 +08:00
//pub fn oriented_angle<N: RealField>(x: &TVec2<N>, y: &TVec2<N>) -> N {
// unimplemented!()
//}
//
2019-03-25 18:21:41 +08:00
//pub fn oriented_angle_ref<N: RealField>(x: &TVec3<N>, y: &TVec3<N>, refv: &TVec3<N>) -> N {
// unimplemented!()
//}