cmpcompat

package
v0.0.0-...-ab28361 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare[T Ordered](x, y T) int

Compare returns

-1 if x is less than y,
 0 if x equals y,
+1 if x is greater than y.

For floating-point types, a NaN is considered less than any non-NaN, a NaN is considered equal to a NaN, and -0.0 is equal to 0.0. See cmp.Compare for more details.

func Less

func Less[T Ordered](x, y T) bool

Less reports whether x is less than y. For floating-point types, a NaN is considered less than any non-NaN, and -0.0 is not less than (is equal to) 0.0. See cmp.Less for more details.

Types

type Ordered

type Ordered = cmp.Ordered

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL