Documentation ¶
Index ¶
- func Asc[T Ordered](x, y T) int
- func Dec[T Ordered](x, y T) int
- func Equal[T comparable](x, y T) bool
- func Greater[T Ordered](x, y T) bool
- func Less[T Ordered](x, y T) bool
- type Complex
- type Field
- type Float
- type Integer
- type Number
- type Ordered
- type Real
- type Signed
- type SignedNumber
- type SignedReal
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asc ¶ added in v0.3.4
Asc 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.
func Dec ¶ added in v0.3.4
Dec returns
-1 if x is greater than y, 0 if x equals y, +1 if x is less 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.
func Equal ¶ added in v0.3.4
func Equal[T comparable](x, y T) bool
Types ¶
type Complex ¶
type Complex interface { ~complex64 | ~complex128 }
Complex is a constraint that permits any complex numeric type.
type Ordered ¶
Ordered is a constraint that permits any ordered type: any type that supports the operators < <= >= >.
type SignedNumber ¶
type SignedNumber interface { SignedReal | Complex }
SignedNumber is a constraint that permits any signed integer, floating-point and complex-numeric type.
type SignedReal ¶
SignedReal is a constraint that permits any signed integer and floating-point type.
Click to show internal directories.
Click to hide internal directories.