frostfs-sdk-go/accounting/test/decimal.go
Leonard Lyubich 48150852f3 [#170] accounting: Refactor and document package functionality
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-21 12:37:53 +03:00

16 lines
278 B
Go

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