use calc_rs::{sum, sub, mul, div}; #[test] fn calc() { println!("{}", sum(4, 2)); // 4 + 2 i32 println!("{}", sub(4, 2)); // 4 - 2 i32 println!("{}", mul(4, 2)); // 4 * 2 i32 println!("{}", div(4.0, 2.0)); // 4.0 / 2.0 f32 let int1 = 51; let int2 = 49; let int3 = sum(int1, int2); // or sub(a, b) or mul(a, b) or div(a, b) println!("{}", int3); let float1 = 1.5; let float2 = 0.5; let float3 = div(float1, float2); println!("{}", float3) }