MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / TBigDecimal

Class TBigDecimal

CodenameOne/src/com/codename1/util/TBigDecimal.java:24–3202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22/// `BigDecimal` instance is represented with a unscaled arbitrary
23/// precision mantissa (the unscaled value) and a scale. The value of the `BigDecimal` is `unscaledValue` 10^(-`scale`).
24class TBigDecimal {
25
26 /// The constant zero as a `BigDecimal`.
27 public static final TBigDecimal ZERO = new TBigDecimal(0, 0);
28
29 /// The constant one as a `BigDecimal`.
30 public static final TBigDecimal ONE = new TBigDecimal(1, 0);
31
32 /// The constant ten as a `BigDecimal`.
33 public static final TBigDecimal TEN = new TBigDecimal(10, 0);
34
35 /// Rounding mode where positive values are rounded towards positive infinity
36 /// and negative values towards negative infinity.
37 ///
38 /// #### See also
39 ///
40 /// - TRoundingMode#UP
41 public static final int ROUND_UP = 0;
42
43 /// Rounding mode where the values are rounded towards zero.
44 ///
45 /// #### See also
46 ///
47 /// - TRoundingMode#DOWN
48 public static final int ROUND_DOWN = 1;
49
50 /// Rounding mode to round towards positive infinity. For positive values
51 /// this rounding mode behaves as `#ROUND_UP`, for negative values as
52 /// `#ROUND_DOWN`.
53 ///
54 /// #### See also
55 ///
56 /// - TRoundingMode#CEILING
57 public static final int ROUND_CEILING = 2;
58
59 /// Rounding mode to round towards negative infinity. For positive values
60 /// this rounding mode behaves as `#ROUND_DOWN`, for negative values as
61 /// `#ROUND_UP`.
62 ///
63 /// #### See also
64 ///
65 /// - TRoundingMode#FLOOR
66 public static final int ROUND_FLOOR = 3;
67
68 /// Rounding mode where values are rounded towards the nearest neighbor.
69 /// Ties are broken by rounding up.
70 ///
71 /// #### See also
72 ///
73 /// - TRoundingMode#HALF_UP
74 public static final int ROUND_HALF_UP = 4;
75
76 /// Rounding mode where values are rounded towards the nearest neighbor.
77 /// Ties are broken by rounding down.
78 ///
79 /// #### See also
80 ///
81 /// - TRoundingMode#HALF_DOWN

Callers

nothing calls this directly

Calls 1

bitLengthMethod · 0.95

Tested by

no test coverage detected