Skip to main content

max

Function max 

Source
pub fn max<T: Copy + PartialOrd>(a: T, b: T) -> T
Expand description

Returns the larger of two values using PartialOrd.

This exists because std::cmp::max requires Ord, but quantities are float-backed and only PartialOrd.