xnumber

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: MIT Imports: 3 Imported by: 7

README

xnumber

Functions
  • type Accuracy func() float64
  • NewAccuracy(eps float64) Accuracy
  • (eps Accuracy) Equal(a, b float64) bool
  • (eps Accuracy) Greater(a, b float64) bool
  • (eps Accuracy) Smaller(a, b float64) bool
  • (eps Accuracy) GreaterOrEqual(a, b float64) bool
  • (eps Accuracy) SmallerOrEqual(a, b float64) bool
  • RenderLatency(ns float64) string
  • RenderByte(b float64) string
  • ParseInt(s string, base int) (int, error)
  • ParseInt8(s string, base int) (int8, error)
  • ParseInt16(s string, base int) (int16, error)
  • ParseInt32(s string, base int) (int32, error)
  • ParseInt64(s string, base int) (int64, error)
  • ParseUint(s string, base int) (uint, error)
  • ParseUint8(s string, base int) (uint8, error)
  • ParseUint16(s string, base int) (uint16, error)
  • ParseUint32(s string, base int) (uint32, error)
  • ParseUint64(s string, base int) (uint64, error)
  • ParseFloat32(s string) (float32, error)
  • ParseFloat64(s string) (float64, error)
  • Atoi(s string) (int, error)
  • Atoi8(s string) (int8, error)
  • Atoi16(s string) (int16, error)
  • Atoi32(s string) (int32, error)
  • Atoi64(s string) (int64, error)
  • Atou(s string) (uint, error)
  • Atou8(s string) (uint8, error)
  • Atou16(s string) (uint16, error)
  • Atou32(s string) (uint32, error)
  • Atou64(s string) (uint64, error)
  • Atof32(s string) (float32, error)
  • Atof64(s string) (float64, error)
  • FormatInt(i int, base int) string
  • FormatInt8(i int8, base int) string
  • FormatInt16(i int16, base int) string
  • FormatInt32(i int32, base int) string
  • FormatInt64(i int64, base int) string
  • FormatUint(i uint, base int) string
  • FormatUint8(i uint8, base int) string
  • FormatUint16(i uint16, base int) string
  • FormatUint32(i uint32, base int) string
  • FormatUint64(i uint64, base int) string
  • FormatFloat32(f float32, fmt byte, prec int) string
  • FormatFloat64(f float64, fmt byte, prec int) string
  • Itoa(i int) string
  • I8toa(i int8) string
  • I16toa(i int16) string
  • I32toa(i int32) string
  • I64toa(i int64) string
  • Utoa(i uint) string
  • U8toa(i uint8) string
  • U16toa(i uint16) string
  • U32toa(i uint32) string
  • U64toa(i uint64) string
  • F32toa(f float32) string
  • F64toa(f float64) string

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atof32

func Atof32(s string) (float32, error)

func Atof64

func Atof64(s string) (float64, error)

func Atoi

func Atoi(s string) (int, error)

func Atoi16

func Atoi16(s string) (int16, error)

func Atoi32

func Atoi32(s string) (int32, error)

func Atoi64

func Atoi64(s string) (int64, error)

func Atoi8

func Atoi8(s string) (int8, error)

func Atou

func Atou(s string) (uint, error)

func Atou16

func Atou16(s string) (uint16, error)

func Atou32

func Atou32(s string) (uint32, error)

func Atou64

func Atou64(s string) (uint64, error)

func Atou8

func Atou8(s string) (uint8, error)

func F32toa

func F32toa(f float32) string

func F64toa

func F64toa(f float64) string

func FormatFloat32

func FormatFloat32(f float32, fmt byte, prec int) string

func FormatFloat64

func FormatFloat64(f float64, fmt byte, prec int) string

func FormatInt

func FormatInt(i int, base int) string

func FormatInt16

func FormatInt16(i int16, base int) string

func FormatInt32

func FormatInt32(i int32, base int) string

func FormatInt64

func FormatInt64(i int64, base int) string

func FormatInt8

func FormatInt8(i int8, base int) string

func FormatUint

func FormatUint(i uint, base int) string

func FormatUint16

func FormatUint16(i uint16, base int) string

func FormatUint32

func FormatUint32(i uint32, base int) string

func FormatUint64

func FormatUint64(i uint64, base int) string

func FormatUint8

func FormatUint8(i uint8, base int) string

func I16toa

func I16toa(i int16) string

func I32toa

func I32toa(i int32) string

func I64toa

func I64toa(i int64) string

func I8toa

func I8toa(i int8) string

func Itoa

func Itoa(i int) string

func ParseFloat32

func ParseFloat32(s string) (float32, error)

func ParseFloat64

func ParseFloat64(s string) (float64, error)

func ParseInt

func ParseInt(s string, base int) (int, error)

func ParseInt16

func ParseInt16(s string, base int) (int16, error)

func ParseInt32

func ParseInt32(s string, base int) (int32, error)

func ParseInt64

func ParseInt64(s string, base int) (int64, error)

func ParseInt8

func ParseInt8(s string, base int) (int8, error)

func ParseUint

func ParseUint(s string, base int) (uint, error)

func ParseUint16

func ParseUint16(s string, base int) (uint16, error)

func ParseUint32

func ParseUint32(s string, base int) (uint32, error)

func ParseUint64

func ParseUint64(s string, base int) (uint64, error)

func ParseUint8

func ParseUint8(s string, base int) (uint8, error)

func RenderByte

func RenderByte(b float64) string

func RenderLatency deprecated

func RenderLatency(ns float64) string

Deprecated: Use `time.Duration.String()` is better

func U16toa

func U16toa(i uint16) string

func U32toa

func U32toa(i uint32) string

func U64toa

func U64toa(i uint64) string

func U8toa

func U8toa(i uint8) string

func Utoa

func Utoa(i uint) string

Types

type Accuracy

type Accuracy func() float64

func NewAccuracy

func NewAccuracy(eps float64) Accuracy

func (Accuracy) Equal

func (eps Accuracy) Equal(a, b float64) bool

func (Accuracy) Greater

func (eps Accuracy) Greater(a, b float64) bool

func (Accuracy) GreaterOrEqual

func (eps Accuracy) GreaterOrEqual(a, b float64) bool

func (Accuracy) Smaller

func (eps Accuracy) Smaller(a, b float64) bool

func (Accuracy) SmallerOrEqual

func (eps Accuracy) SmallerOrEqual(a, b float64) bool

Jump to

Keyboard shortcuts

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