Documentation
¶
Index ¶
- func ConvertCeil(a currency.Amount, rate currency.Rate) (currency.Amount, error)
- func ConvertFloor(a currency.Amount, rate currency.Rate) (currency.Amount, error)
- func Integer(c currency.Short, amount int64) currency.Amount
- func MultiplyCeil(a currency.Amount, multiplier float64) (currency.Amount, error)
- func MultiplyFloor(a currency.Amount, multiplier float64) (currency.Amount, error)
- func Must(amount currency.Amount, err error) currency.Amount
- func New(currency currency.Short, amount float64) currency.Amount
- func Sum(amounts ...currency.Amount) (currency.Amount, error)
- func Zero(c currency.Short) currency.Amount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertCeil ¶
ConvertCeil performs currency conversion for given currency using given rate and rounds up result to decimal digits
func ConvertFloor ¶
ConvertFloor performs currency conversion for given currency using given rate and rounds down result to decimal digits
func MultiplyCeil ¶
MultiplyCeil applies multiplier on given amount and rounds up result to decimal digits
func MultiplyFloor ¶
MultiplyFloor applies multiplier on given amount and rounds down result to decimal digits
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.