Crates.io | math-crate |
lib.rs | math-crate |
version | 0.1.3 |
source | src |
created_at | 2022-12-25 02:17:44.738681 |
updated_at | 2022-12-25 03:49:23.109243 |
description | A libary for doing simple calculations in Rust. |
homepage | |
repository | |
max_upload_size | |
id | 745135 |
size | 5,183 |
'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