Useful_Math/
lib.rs

1/*!
2btw if you're looking at all these versions before idk probably 0.1.0 they're all garbage while I figure out how docs.rs work
3*/
4extern 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}
18///trig functions are here
19pub mod trigonometry {
20
21	///used to distinguish between using degrees and radians for the trig functions
22	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>{//!documentation?
27		return num::pow::pow(num.clone(),num.into())
28	}
29	
30	///cosin hello
31	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	/// tan is here with slightly more functionality
37	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}