diff options
Diffstat (limited to 'src/include/taler_amount_lib.h')
-rw-r--r-- | src/include/taler_amount_lib.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h index 4f77c322e..63c5dba40 100644 --- a/src/include/taler_amount_lib.h +++ b/src/include/taler_amount_lib.h | |||
@@ -51,6 +51,9 @@ extern "C" | |||
51 | * | 51 | * |
52 | * Note that we need sub-cent precision here as transaction fees might | 52 | * Note that we need sub-cent precision here as transaction fees might |
53 | * be that low, and as we want to support microdonations. | 53 | * be that low, and as we want to support microdonations. |
54 | * | ||
55 | * An actual `struct Amount a` thus represents | ||
56 | * "a.value + (a.fraction / #TALER_AMOUNT_FRAC_BASE)" units of "a.currency". | ||
54 | */ | 57 | */ |
55 | #define TALER_AMOUNT_FRAC_BASE 100000000 | 58 | #define TALER_AMOUNT_FRAC_BASE 100000000 |
56 | 59 | ||
@@ -76,7 +79,7 @@ struct TALER_AmountNBO | |||
76 | uint64_t value GNUNET_PACKED; | 79 | uint64_t value GNUNET_PACKED; |
77 | 80 | ||
78 | /** | 81 | /** |
79 | * Additinal fractional value, in NBO. | 82 | * Fraction (integer multiples of #TALER_AMOUNT_FRAC_BASE), in NBO. |
80 | */ | 83 | */ |
81 | uint32_t fraction GNUNET_PACKED; | 84 | uint32_t fraction GNUNET_PACKED; |
82 | 85 | ||
@@ -100,7 +103,7 @@ struct TALER_Amount | |||
100 | uint64_t value; | 103 | uint64_t value; |
101 | 104 | ||
102 | /** | 105 | /** |
103 | * Fraction (denominator of fraction) | 106 | * Fraction (integer multiples of #TALER_AMOUNT_FRAC_BASE). |
104 | */ | 107 | */ |
105 | uint32_t fraction; | 108 | uint32_t fraction; |
106 | 109 | ||