1extern crate num;
5#[cfg(test)]
6mod tests {
7 #[test]
8 fn sin_test() {
9
10 }
11 fn cos_test() {
12
13 }
14 fn tan_test() {
15
16 }
17}
18pub mod trigonometry {
20
21 enum Mode{degrees,radians}
23
24
25 fn sin <T>(num:T,mode:Mode) -> T
26 where T:std::ops::Mul<Output = T>+std::clone::Clone+num::Num+std::convert::Into<usize>{return num::pow::pow(num.clone(),num.into())
28 }
29
30 fn cos <T>(num:T,mode:Mode) -> T
32 where T:std::ops::Div<Output = T>+std::clone::Clone{
33 return num
34 }
35
36 fn tan <T>(num:T,mode:Mode) -> T
38 where T:std::ops::Div<Output = T>+std::clone::Clone{
39 return num.clone()/num
40 }
41}