math

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBase = 16

Variables

This section is empty.

Functions

func Abs

func Abs[T constraints.Signed](n T) T

Abs computes abs.

func DecodeProcessID

func DecodeProcessID(num, base int64) (int64, int64)

func EncodeProcessID

func EncodeProcessID(num1, base, num2 int64) (int64, error)

func IsZero

func IsZero(d *gxbig.Decimal) bool

func Max

func Max[T Number](a, b T) T

func Min

func Min[T Number](a, b T) T

func ToDecimal

func ToDecimal(value interface{}) *gxbig.Decimal

Types

type Number

type Number interface {
	constraints.Integer | constraints.Float
}

Jump to

Keyboard shortcuts

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