Update accounting package docs
Adding comments on the formats used in messages. Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
28a917028d
commit
99e701e70d
2 changed files with 32 additions and 26 deletions
|
@ -5,11 +5,18 @@ package neo.fs.v2.accounting;
|
|||
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accounting";
|
||||
option csharp_namespace = "NeoFS.API.v2.Accounting";
|
||||
|
||||
// Decimal represents the decimal numbers.
|
||||
// Standard floating point data type can't be used in NeoFS due to inexactness
|
||||
// of the result when doing lots of small number operations. To solve the lost
|
||||
// precision issue, special `Decimal` format is used for monetary computations.
|
||||
//
|
||||
// Please see [The General Decimal Arithmetic
|
||||
// Specification](http://speleotrove.com/decimal/) for detailed problem
|
||||
// description.
|
||||
message Decimal {
|
||||
// value carries number value.
|
||||
// Number in smallest Token fractions.
|
||||
int64 value = 1;
|
||||
|
||||
// precision carries value precision.
|
||||
// Precision value indicating how many smallest fractions can be in one
|
||||
// integer.
|
||||
uint32 precision = 2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue