4 releases
0.1.3 | Dec 25, 2022 |
---|---|
0.1.2 | Dec 25, 2022 |
0.1.1 | Dec 25, 2022 |
0.1.0 | Dec 25, 2022 |
#1803 in Math
23 downloads per month
4KB
Math Crate
'Math Crate' is a collection of utilities to perfom simple math calculations.
The function add() adds the numbers together.
Example:
let num1 = 9;
let num2 = 10;
let answer = math_crate::add(num1, num2);
assert_eq!(19);
The function subtract() subtracts the numbers together.
Example:
let num1 = 7;
let num2 = 5;
let answer = math_crate::subtract(num1, num2);
assert_eq!(2);
The function multiply() multiplies the numbers together.
Example:
let num1 = 9;
let num2 = 3;
let answer = math_crate::multiply(num1, num2);
assert_eq!(27);
The function divide() divides the numbers together.
Example:
let num1 = 7.1;
let num2 = 3.0;
let answer = math_crate::divide(num1, num2);
assert_eq!(2.366666666666667);
Full documentation: docs.rs/math-crate Github repo: github.com