digit

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T Digit](d T) T

func CheckedAdd added in v1.0.0

func CheckedAdd[T Integer](a, b T) gust.Option[T]

func Max added in v1.0.0

func Max[T Integer]() T

func SaturatingAdd added in v1.0.0

func SaturatingAdd[T Integer](a, b T) T

func SaturatingSub added in v1.0.0

func SaturatingSub[T Digit](a, b T) T

func UintCheckedMul added in v1.0.0

func UintCheckedMul[T Integer](a, b T) gust.Option[T]

Types

type Digit

type Digit interface {
	Integer | ~float32 | ~float64
}

type Integer

type Integer interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}

type PureInteger added in v1.0.0

type PureInteger interface {
	int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64
}

Jump to

Keyboard shortcuts

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