fixedpoint

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 6 Imported by: 125

Documentation

Index

Constants

View Source
const DefaultPow = 1e8
View Source
const DefaultPrecision = 8

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value int64

func Max added in v1.11.0

func Max(a, b Value) Value

func Min added in v1.11.0

func Min(a, b Value) Value

func Must

func Must(v Value, err error) Value

func MustNewFromString added in v1.13.0

func MustNewFromString(input string) Value

func NewFromFloat

func NewFromFloat(val float64) Value

func NewFromFloat32

func NewFromFloat32(val float32) Value

func NewFromInt

func NewFromInt(val int) Value

func NewFromInt64

func NewFromInt64(val int64) Value

func NewFromString

func NewFromString(input string) (Value, error)

func (Value) Add

func (v Value) Add(v2 Value) Value

func (*Value) AtomicAdd added in v1.2.0

func (v *Value) AtomicAdd(v2 Value)

func (*Value) AtomicLoad added in v1.2.0

func (v *Value) AtomicLoad() Value

func (Value) Div

func (v Value) Div(v2 Value) Value

func (Value) Float64

func (v Value) Float64() float64

func (Value) Int64

func (v Value) Int64() int64

func (Value) MarshalJSON added in v1.3.1

func (v Value) MarshalJSON() ([]byte, error)

func (Value) Mul

func (v Value) Mul(v2 Value) Value

func (Value) MulFloat64

func (v Value) MulFloat64(v2 float64) Value

func (*Value) Scan added in v1.13.0

func (v *Value) Scan(src interface{}) error

func (Value) Sub

func (v Value) Sub(v2 Value) Value

func (*Value) UnmarshalJSON

func (v *Value) UnmarshalJSON(data []byte) error

func (*Value) UnmarshalYAML

func (v *Value) UnmarshalYAML(unmarshal func(a interface{}) error) (err error)

func (Value) Value added in v1.13.0

func (v Value) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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