2018-09-22 19:18:59 +08:00
|
|
|
use na::{DefaultAllocator, Real};
|
|
|
|
|
2018-09-23 20:48:45 +08:00
|
|
|
use aliases::TVec;
|
2018-10-22 04:11:27 +08:00
|
|
|
use traits::{Alloc, Dimension};
|
2018-09-22 19:18:59 +08:00
|
|
|
|
|
|
|
/// The angle between two vectors.
|
2018-09-23 20:48:45 +08:00
|
|
|
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> {
|
2018-09-22 19:18:59 +08:00
|
|
|
x.angle(y)
|
|
|
|
}
|
|
|
|
|
2018-09-23 20:41:56 +08:00
|
|
|
//pub fn oriented_angle<N: Real>(x: &TVec2<N>, y: &TVec2<N>) -> N {
|
2018-09-22 19:18:59 +08:00
|
|
|
// 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 {
|
2018-09-22 19:18:59 +08:00
|
|
|
// unimplemented!()
|
|
|
|
//}
|