use na::{self, Real, DimName, DefaultAllocator}; use aliases::Vec; use traits::Alloc; pub fn acos(x: &Vec) -> Vec where DefaultAllocator: Alloc { x.map(|e| e.acos()) } pub fn acosh(x: &Vec) -> Vec where DefaultAllocator: Alloc { x.map(|e| e.acosh()) } pub fn asin(x: &Vec) -> Vec where DefaultAllocator: Alloc { x.map(|e| e.asin()) } pub fn asinh(x: &Vec) -> Vec where DefaultAllocator: Alloc { x.map(|e| e.asinh()) } pub fn atan2(y: &Vec, x: &Vec) -> Vec where DefaultAllocator: Alloc { y.zip_map(x, |y, x| y.atan2(x)) } pub fn atan(y_over_x: &Vec) -> Vec where DefaultAllocator: Alloc { y_over_x.map(|e| e.atan()) } pub fn atanh(x: &Vec) -> Vec where DefaultAllocator: Alloc { x.map(|e| e.atanh()) } pub fn cos(angle: &Vec) -> Vec where DefaultAllocator: Alloc { angle.map(|e| e.cos()) } pub fn cosh(angle: &Vec) -> Vec where DefaultAllocator: Alloc { angle.map(|e| e.cosh()) } pub fn degrees(radians: &Vec) -> Vec where DefaultAllocator: Alloc { radians.map(|e| e * na::convert(180.0) / N::pi()) } pub fn radians(degrees: &Vec) -> Vec where DefaultAllocator: Alloc { degrees.map(|e| e * N::pi() / na::convert(180.0)) } pub fn sin(angle: &Vec) -> Vec where DefaultAllocator: Alloc { angle.map(|e| e.sin()) } pub fn sinh(angle: &Vec) -> Vec where DefaultAllocator: Alloc { angle.map(|e| e.sinh()) } pub fn tan(angle: &Vec) -> Vec where DefaultAllocator: Alloc { angle.map(|e| e.tan()) } pub fn tanh(angle: &Vec) -> Vec where DefaultAllocator: Alloc { angle.map(|e| e.tanh()) }