std.cmp.min
Show source codeHide source code
fn pub min[T: Compare[T]](a: T, b: T) -> T {
if a <= b { a } else { b }
}
fn pub static min[T: Compare[T]](a: T, b: T) -> T
Returns the minimum of two values.
Examples
import std.cmp (min)
min(10, 5) # => 5