#calculations #libary #utilities #collection

bin+lib math-crate

A libary for doing simple calculations in Rust

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

#1458 in Math

Download history 6/week @ 2024-02-25 62/week @ 2024-03-31

62 downloads per month

MIT license

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

No runtime deps