Documentation
¶
Index ¶
Constants ¶
View Source
const (
PicoDollarsPerDollar = 1e12
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PicoDollar ¶
type PicoDollar int64
Picodollar is a type to represent currency with 12 decimal precision
func FromDollars ¶
func FromDollars(dollars float64) (PicoDollar, error)
FromDollars converts a dollar amount (as a float) to Picodollars This should mostly be used for testing, and real usage should be done purely in PicoDollars
func (PicoDollar) String ¶
func (p PicoDollar) String() string
func (PicoDollar) ToMicroDollars ¶
func (p PicoDollar) ToMicroDollars() int64
ToMicroDollars converts PicoDollars to MicroDollars (1e6 units per dollar)
Click to show internal directories.
Click to hide internal directories.