decimal

package
v0.0.0-...-439cb23 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decimal

type Decimal struct {
	// contains filtered or unexported fields
}
var Zero Decimal = Decimal{
	// contains filtered or unexported fields
}

func NewFromDecimal128

func NewFromDecimal128(v primitive.Decimal128) Decimal

func NewFromFloat

func NewFromFloat(v float64) Decimal

func NewFromInt

func NewFromInt(v int64) Decimal

func NewFromString

func NewFromString(v string) Decimal

func (Decimal) Abs

func (d Decimal) Abs() Decimal

func (Decimal) Add

func (d Decimal) Add(other Decimal) Decimal

func (Decimal) Ceil

func (d Decimal) Ceil() Decimal

func (Decimal) Decimal128

func (d Decimal) Decimal128() primitive.Decimal128

func (Decimal) Div

func (d Decimal) Div(other Decimal) Decimal

func (Decimal) Equal

func (d Decimal) Equal(other Decimal) bool

func (Decimal) Float64

func (d Decimal) Float64() float64

func (Decimal) Floor

func (d Decimal) Floor() Decimal

func (Decimal) GreaterThan

func (d Decimal) GreaterThan(other Decimal) bool

func (Decimal) GreaterThanOrEqual

func (d Decimal) GreaterThanOrEqual(other Decimal) bool

func (Decimal) IsNegative

func (d Decimal) IsNegative() bool

func (Decimal) IsPositive

func (d Decimal) IsPositive() bool

func (Decimal) IsZero

func (d Decimal) IsZero() bool

func (Decimal) LessThan

func (d Decimal) LessThan(other Decimal) bool

func (Decimal) LessThanOrEqual

func (d Decimal) LessThanOrEqual(other Decimal) bool

func (Decimal) Mod

func (d Decimal) Mod(other Decimal) Decimal

func (Decimal) Mul

func (d Decimal) Mul(other Decimal) Decimal

func (Decimal) Neg

func (d Decimal) Neg() Decimal

func (Decimal) NotEqual

func (d Decimal) NotEqual(other Decimal) bool

func (Decimal) Pow

func (d Decimal) Pow(other Decimal) Decimal

func (Decimal) Round

func (d Decimal) Round(places int32) Decimal

func (Decimal) Sign

func (d Decimal) Sign() int

func (Decimal) String

func (d Decimal) String() string

func (Decimal) Sub

func (d Decimal) Sub(other Decimal) Decimal

func (Decimal) Truncate

func (d Decimal) Truncate(places int32) Decimal

Jump to

Keyboard shortcuts

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