2019-03-25 18:21:41 +08:00
|
|
|
use na::{DefaultAllocator, RealField};
|
2018-09-22 19:18:59 +08:00
|
|
|
|
2019-03-23 21:29:07 +08:00
|
|
|
use crate::aliases::TVec;
|
|
|
|
use crate::traits::{Alloc, Dimension};
|
2018-09-22 19:18:59 +08:00
|
|
|
|
|
|
|
/// 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
|
2018-10-22 13:00:10 +08:00
|
|
|
where DefaultAllocator: Alloc<N, D> {
|
2018-09-22 19:18:59 +08:00
|
|
|
x.angle(y)
|
|
|
|
}
|
|
|
|
|
2019-03-25 18:21:41 +08:00
|
|
|
//pub fn oriented_angle<N: RealField>(x: &TVec2<N>, y: &TVec2<N>) -> N {
|
2018-09-22 19:18:59 +08:00
|
|
|
// 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 {
|
2018-09-22 19:18:59 +08:00
|
|
|
// unimplemented!()
|
|
|
|
//}
|