#arithmetic-operations #subtraction #divide

arithmetic_yukinari

A simple arithmetic library

8 releases

0.1.7 Dec 7, 2023
0.1.6 Dec 7, 2023

#1064 in Math

MIT license

4KB

arithmetic_yukinari

Rust Test and Publish crate-name at crates.io crate-name at docs.rs

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));
}

No runtime deps