Function lib::util::other::chmin

source ·
pub fn chmin<T: PartialOrd>(mn: &mut T, n: T) -> bool
Expand description

Update mn = min(mn, n), and return if mn was updated.

§Examples

use lib::util::other::chmin;
let mut mn = 998244353;
if chmin(&mut mn, 3) {}