Documentation
¶
Index ¶
- func Add[T Number](a, b T) T
- func Divide[T Number](a, b T) T
- func Fail(msg any)
- func FailOnError(err error)
- func Hash(v string) string
- func IsFinite(v float64) bool
- func IsInfinite(v float64) bool
- func IsNaN(v float64) bool
- func Multiply[T Number](a, b T) T
- func Must[T any](t T, err error) T
- func MustOK[T any](t T, ok bool) T
- func NewDuration[T Number](n T, d time.Duration) time.Duration
- func NoError[T any](_ T, err error) bool
- func OK[T any](_ T, ok bool) bool
- func Perm2[T any](v ...T) [][]T
- func Subtract[T Number](a, b T) T
- func TempDir(p ...string) string
- func ToDegrees(radian float64) float64
- func ToRadians(degrees float64) float64
- type Comparable
- type CompareResult
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailOnError ¶
func FailOnError(err error)
func IsInfinite ¶
Types ¶
type Comparable ¶
type CompareResult ¶
type CompareResult int
const ( CompareLess CompareResult = iota - 1 CompareEqual CompareGreater CompareUnknown )
func Compare ¶
func Compare[T Comparable](a, b T) CompareResult
type Number ¶
type Number interface {
constraints.Float | constraints.Integer
}
Click to show internal directories.
Click to hide internal directories.