frostfs-sdk-go/accounting/test/decimal.go
Alex Vanin a64aa36c1a [#39] accounting: Move decimal structure to SDK
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-10-28 14:52:59 +03:00

16 lines
297 B
Go

package accountingtest
import (
"math/rand"
"github.com/nspcc-dev/neofs-sdk-go/accounting"
)
// GenerateDecimal returns random accounting.Decimal.
func GenerateDecimal() *accounting.Decimal {
d := accounting.NewDecimal()
d.SetValue(rand.Int63())
d.SetPrecision(rand.Uint32())
return d
}