Search results

There are no results.

std.cmp.max

Show source code
Hide source code
fn pub max[T: Compare[T]](a: T, b: T) -> T {
  if a >= b { a } else { b }
}
fn pub static max[T: Compare[T]](a: T, b: T) -> T

Returns the maximum of two values.

Examples

import std.cmp (max)

max(10, 5) # => 10