SHA256
统一命名
This commit is contained in:
@@ -18,11 +18,11 @@ public:
|
||||
BigDecimal(const BigDecimal& other) = default;
|
||||
BigDecimal& operator=(const BigDecimal& other) = default;
|
||||
|
||||
bool isZero() const;
|
||||
int sign() const;
|
||||
int getScale() const;
|
||||
BigInteger getUnscaledValue() const;
|
||||
std::string toString() const;
|
||||
[[nodiscard]] bool isZero() const;
|
||||
[[nodiscard]] int sign() const;
|
||||
[[nodiscard]] int getScale() const;
|
||||
[[nodiscard]] BigInteger getUnscaledValue() const;
|
||||
[[nodiscard]] std::string toString() const;
|
||||
|
||||
// Comparison operators
|
||||
bool operator==(const BigDecimal& other) const;
|
||||
@@ -59,14 +59,14 @@ public:
|
||||
BigDecimal operator*(const BigDecimal& other) const;
|
||||
BigDecimal operator/(const BigDecimal& other) const;
|
||||
|
||||
BigDecimal abs() const;
|
||||
BigDecimal round(int scale) const;
|
||||
[[nodiscard]] BigDecimal abs() const;
|
||||
[[nodiscard]] BigDecimal round(int scale) const;
|
||||
|
||||
private:
|
||||
BigInteger unscaledValue_; // 去掉小数点后的值
|
||||
int scale_; // 小数点后的位数
|
||||
BigInteger m_unscaledValue; // 去掉小数点后的值
|
||||
int m_scale; // 小数点后的位数
|
||||
|
||||
static void alignScale(BigInteger& lhs, int& lhsScale,
|
||||
static void m_alignScale(BigInteger& lhs, int& lhsScale,
|
||||
BigInteger& rhs, int& rhsScale);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user