2 stable releases
1.0.1 | Oct 24, 2024 |
---|
#526 in Math
204 downloads per month
6KB
56 lines
Introduction
This crate provides "change min (max)" operation in Rust.
Installation
cargo add min_max_assign
License
MIT or Apache 2.0
lib.rs
:
This crate provides "change min(max)" implementation in Rust.
Example
use min_max_assign::*;
let mut i = 100;
i.min_assign(10);
assert_eq!(i, 10);
let mut f = 10.0;
f.max_assign(100.0);
assert_eq!(f, 100.0)