math

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FLOAT64_MAX      = math.MaxFloat64
	UINT_MIN    uint = 0
	UINT_MAX         = ^uint(0)
	INT_MAX          = int(^uint(0) >> 1)
	INT_MIN          = ^INT_MAX
)

Variables

This section is empty.

Functions

func Byte2Int

func Byte2Int(data []byte) int

func ByteToFloat32

func ByteToFloat32(bytes []byte) float32

func ByteToFloat64

func ByteToFloat64(bytes []byte) float64

func ByteToUint64

func ByteToUint64(data []byte) uint64

func BytesToInt64

func BytesToInt64(buf []byte) int64

func Float32ToByte

func Float32ToByte(float float32) []byte

func Float64ToByte

func Float64ToByte(float float64) []byte

func FloatFloor

func FloatFloor(f float64, prec int) float64

func Int2Byte

func Int2Byte(data int) (ret []byte)

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func Max

func Max[T byte | int | int8 | int16 | int32 | int64 | uint16 | uint32 | uint64 | float32 | float64](a, b T) T

func Min

func Min[T byte | int | int8 | int16 | int32 | int64 | uint16 | uint32 | uint64 | float32 | float64](a, b T) T

func Uint64ToByte

func Uint64ToByte(i uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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