fixed

package
v0.0.0-...-8c695d9 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDoesNotFitInRequestedType = errors.New("does not fit in requested type")

ErrDoesNotFitInRequestedType is returned from the fixed-point CheckedAs() functions if the requested type cannot exactly represent the value.

Functions

This section is empty.

Types

type D1

type D1 int64

D1 is used for fixed-point types with 1 decimal place.

func (D1) Multiplier

func (d D1) Multiplier() int64

Multiplier implements Dx.

func (D1) Places

func (d D1) Places() int

Places implements Dx.

type D10

type D10 int64

D10 is used for fixed-point types with 10 decimal places.

func (D10) Multiplier

func (d D10) Multiplier() int64

Multiplier implements Dx.

func (D10) Places

func (d D10) Places() int

Places implements Dx.

type D11

type D11 int64

D11 is used for fixed-point types with 11 decimal places.

func (D11) Multiplier

func (d D11) Multiplier() int64

Multiplier implements Dx.

func (D11) Places

func (d D11) Places() int

Places implements Dx.

type D12

type D12 int64

D12 is used for fixed-point types with 12 decimal places.

func (D12) Multiplier

func (d D12) Multiplier() int64

Multiplier implements Dx.

func (D12) Places

func (d D12) Places() int

Places implements Dx.

type D13

type D13 int64

D13 is used for fixed-point types with 13 decimal places.

func (D13) Multiplier

func (d D13) Multiplier() int64

Multiplier implements Dx.

func (D13) Places

func (d D13) Places() int

Places implements Dx.

type D14

type D14 int64

D14 is used for fixed-point types with 14 decimal places.

func (D14) Multiplier

func (d D14) Multiplier() int64

Multiplier implements Dx.

func (D14) Places

func (d D14) Places() int

Places implements Dx.

type D15

type D15 int64

D15 is used for fixed-point types with 15 decimal places.

func (D15) Multiplier

func (d D15) Multiplier() int64

Multiplier implements Dx.

func (D15) Places

func (d D15) Places() int

Places implements Dx.

type D16

type D16 int64

D16 is used for fixed-point types with 16 decimal places.

func (D16) Multiplier

func (d D16) Multiplier() int64

Multiplier implements Dx.

func (D16) Places

func (d D16) Places() int

Places implements Dx.

type D2

type D2 int64

D2 is used for fixed-point types with 2 decimal places.

func (D2) Multiplier

func (d D2) Multiplier() int64

Multiplier implements Dx.

func (D2) Places

func (d D2) Places() int

Places implements Dx.

type D3

type D3 int64

D3 is used for fixed-point types with 3 decimal places.

func (D3) Multiplier

func (d D3) Multiplier() int64

Multiplier implements Dx.

func (D3) Places

func (d D3) Places() int

Places implements Dx.

type D4

type D4 int64

D4 is used for fixed-point types with 4 decimal places.

func (D4) Multiplier

func (d D4) Multiplier() int64

Multiplier implements Dx.

func (D4) Places

func (d D4) Places() int

Places implements Dx.

type D5

type D5 int64

D5 is used for fixed-point types with 5 decimal places.

func (D5) Multiplier

func (d D5) Multiplier() int64

Multiplier implements Dx.

func (D5) Places

func (d D5) Places() int

Places implements Dx.

type D6

type D6 int64

D6 is used for fixed-point types with 6 decimal places.

func (D6) Multiplier

func (d D6) Multiplier() int64

Multiplier implements Dx.

func (D6) Places

func (d D6) Places() int

Places implements Dx.

type D7

type D7 int64

D7 is used for fixed-point types with 7 decimal places.

func (D7) Multiplier

func (d D7) Multiplier() int64

Multiplier implements Dx.

func (D7) Places

func (d D7) Places() int

Places implements Dx.

type D8

type D8 int64

D8 is used for fixed-point types with 8 decimal places.

func (D8) Multiplier

func (d D8) Multiplier() int64

Multiplier implements Dx.

func (D8) Places

func (d D8) Places() int

Places implements Dx.

type D9

type D9 int64

D9 is used for fixed-point types with 9 decimal places.

func (D9) Multiplier

func (d D9) Multiplier() int64

Multiplier implements Dx.

func (D9) Places

func (d D9) Places() int

Places implements Dx.

type Dx

type Dx interface {
	Places() int
	Multiplier() int64
}

Dx is the constraint for allowed decimal place types. These methods must return a static value and be usable with the zero value of the type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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