pub fn minmax<T>(v1: T, v2: T) -> [T; 2]where
T: Ord,
🔬This is a nightly-only experimental API. (
cmp_minmax
#115939)Expand description
Compares and sorts two values, returning minimum and maximum.
Returns [v1, v2]
if the comparison determines them to be equal.