1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// ---------------------------------------------------------------------------
// Copyright: (c) 2022 ff. Michael Amrhein (michael@adrhinum.de)
// License: This program is part of a larger application. For license
// details please read the file LICENSE.TXT provided together
// with the application.
// ---------------------------------------------------------------------------
// $Source: src/amnt_dec.rs $
// $Revision: 2022-04-17T15:02:37+02:00 $
pub use ;
/// Type used for the numerical part of a Quantity.
///
/// When feature `fpdec` is off (= default), AmountT is defined as `f64` on a
/// 64-bit system or as `f32` on a 32-bit system.
///
/// When feature fpdec is activated, AmountT is defined as `Decimal`
/// (imported from crate `fpdec`).
///
/// The macro `Amnt!` can be used to convert float literals correctly to
/// `AmountT` depending on the configuration.
pub type AmountT = Decimal;
/// AmountT constant equal 0
pub const AMNT_ZERO: AmountT = ZERO;
/// AmountT constant equal 1
pub const AMNT_ONE: AmountT = ONE;
/// Converts a numeric literal to an `AmountT`.