- Allowed rounding to the scale smaller than the currency scale.
- Improved table formatting in documentation.
- Improved examples and documentation.
- Improved test coverage.
- Implemented constructors:
NewAmountFromInt64
,NewAmountFromFloat64
,NewAmountFromMinorUnits
,NewExchRareFromInt64
,NewExchRareFromFloat64
.
- Implemented methods:
Amount.Decimal
,Amount.MinScale
,Amount.CmbAbs
,Amount.SubAbs
,Amount.Clamp
,ExchangeRate.Float64
,ExchangeRate.Int64
,ExchangeRate.Decimal
,ExchangeRate.Ceil
,ExchangeRate.Floor
,ExchangeRate.Trunc
,ExchangeRate.Trim
.ExchangeRate.IsPos
,ExchangeRate.Sign
,ExchangeRate.MinScale
,ExchangeRate.Quantize
,
- Implemented
NullCurrency
type.
- Renamed
NewAmount
contructor toNewAmountFromDecimal
. - Renamed
NewExchRate
constructor toNewExchRateFromDecimal
. - Changed
ExchangeRate.Round
, now it returns an error. - Changed
ExchangeRate.Format
, now%c
returns quore currency, not a currency pair.
- Removed methods:
Amount.Prec
,Amount.Coef
,ExchangeRate.RoundToCurr
,ExchangeRate.Prec
,ExchangeRate.SameScaleAsCurr
.
- Implemented
Currency.Scan
andCurrency.Value
.
Amount.CopySign
treats 0 as a positive.- Enabled
gocyclo
,gosec
,godot
, andstylecheck
linters.
- Implemented
Amount.QuoRem
method.
- Implemented
scale
argument forAmount.Int64
method.
- All methods return error instead of panicing.
- Renamed
Amount.Round
toAmount.Rescale
. - Renamed
ExchangeRate.Round
toExchangeRate.Rescale
.
- Improved documentation.
- Implemented
Amount.Int64
method. - Implemented
Amount.Float64
method.
- Reviewed and improved documentation.
- Initial version