8 releases
0.1.7 | Dec 7, 2023 |
---|---|
0.1.6 | Dec 7, 2023 |
#1064 in Math
4KB
arithmetic_yukinari
Description
This crate is a library for arithmetic operations.
Installation
[dependencies]
arithmetic_yukinari = "0.1"
Usage
use arithmetic_yukinari::{add, subtract, multiply, divide};
fn main() {
let a = add(1, 2);
assert_eq!(a, 3);
let s = subtract(1, 2);
assert_eq!(s, -1);
let m = multiply(2, 3);
assert_eq!(m, 6);
let d = divide(6, 3);
assert_eq!(d, Some(2));
}