vars

package
v6.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDecPrec         = 28
	DefaultDecRoundingMode = big.ToNearestEven
)
View Source
const (
	RoundingModeCeil     = "ceil"
	RoundingModeDown     = "down"
	RoundingModeFloor    = "floor"
	RoundingModeHalfUp   = "half.up"
	RoundingModeHalfEven = "half.even"
	RoundingModeUp       = "up"
)
View Source
const (
	FloatID          = "float"
	DefaultFloatPrec = 113
)
View Source
const (
	DefaultDateLayout     = "[weekday/abbr] [month/abbr] [day] [year]"
	DefaultTimeLayout     = "[hour/12]:[minute]:[second][period/alt] [offset-zone]"
	DefaultDateTimeLayout = DefaultDateLayout + " " + DefaultTimeLayout
)
View Source
const DecID = "dec"
View Source
const RandID = "rand"
View Source
const TimeID = "time"

Variables

This section is empty.

Functions

func DecRounder

func DecRounder(rm big.RoundingMode) apd.Rounder

Types

type Dec

type Dec struct {
	Math         *apd.Context
	RoundingMode big.RoundingMode
}

func ForDec

func ForDec(state coll.State) *Dec

func (*Dec) GetRoundingMode

func (d *Dec) GetRoundingMode() string

func (*Dec) SetRoundingMode

func (d *Dec) SetRoundingMode(rm string) error

type Float

type Float struct {
	Prec uint
}

func ForFloat

func ForFloat(state coll.State) *Float

type Rand

type Rand struct {
	Rand   *rand.Rand
	Source *rand.PCG
	Seed   *big.Int
}

func ForRand

func ForRand(state coll.State) *Rand

func (*Rand) SplitSeed

func (r *Rand) SplitSeed() (uint64, uint64)

type Time

type Time struct {
	Locale         *locale.Locale
	Zone           *time.Location
	ZoneName       string
	DateLayout     string
	TimeLayout     string
	DateTimeLayout string
	Now            func() time.Time
}

func ForTime

func ForTime(state coll.State) *Time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳