math-crate

Crates.iomath-crate
lib.rsmath-crate
version0.1.3
sourcesrc
created_at2022-12-25 02:17:44.738681
updated_at2022-12-25 03:49:23.109243
descriptionA libary for doing simple calculations in Rust.
homepage
repository
max_upload_size
id745135
size5,183
(Kev584)

documentation

https://docs.rs/math-crate/0.1.0/math_crate/

README

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

Commit count: 0

cargo fmt