mathutils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const BigIntBytesLength = 32

Variables

This section is empty.

Functions

func BigIntToBytes

func BigIntToBytes(val *big.Int) ([]byte, error)

func BytesToBigInt

func BytesToBigInt(bytes []byte) *big.Int

func BytesToFloat64

func BytesToFloat64(bytes []byte) float64

func BytesToUint16

func BytesToUint16(bytes []byte) uint16

func BytesToUint32

func BytesToUint32(bytes []byte) uint32

func BytesToUint64

func BytesToUint64(bytes []byte) uint64

func BytesToVarInt

func BytesToVarInt(bytes []byte) uint64

func BytesToVarIntByCursor

func BytesToVarIntByCursor(bytes []byte, cursor int) uint64

func Float64ToBytes

func Float64ToBytes(float float64) []byte

Float64ToByte Float64转byte

func GetStringAmount

func GetStringAmount(val *big.Int, scale int) string

func GetVarIntLen

func GetVarIntLen(bytes []byte, cursor int) int

func Pow

func Pow(x *big.Int, n int) *big.Int

func StringToBigInt

func StringToBigInt(val string) (*big.Int, error)

func Uint16ToBytes

func Uint16ToBytes(n uint16) []byte

func Uint32ToBytes

func Uint32ToBytes(n uint32) []byte

func Uint64ToBytes

func Uint64ToBytes(n uint64) []byte

func VarIntToBytes

func VarIntToBytes(value 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