mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 02:25:52 +00:00
moves Loandelta function to a better place
This commit is contained in:
@@ -68,6 +68,17 @@ isRounded(Asset const& asset, Number const& value, std::int32_t scale)
|
||||
|
||||
namespace detail {
|
||||
|
||||
void
|
||||
LoanDeltas::nonNegative()
|
||||
{
|
||||
if (principal < beast::zero)
|
||||
principal = numZero;
|
||||
if (interest < beast::zero)
|
||||
interest = numZero;
|
||||
if (managementFee < beast::zero)
|
||||
managementFee = numZero;
|
||||
}
|
||||
|
||||
/* Computes (1 + periodicRate)^paymentsRemaining for amortization calculations.
|
||||
*
|
||||
* Equation (5) from XLS-66 spec, Section A-2 Equation Glossary
|
||||
@@ -884,17 +895,11 @@ PaymentComponents::trackedInterestPart() const
|
||||
(trackedPrincipalDelta + trackedManagementFeeDelta);
|
||||
}
|
||||
|
||||
void
|
||||
LoanDeltas::nonNegative()
|
||||
{
|
||||
if (principal < beast::zero)
|
||||
principal = numZero;
|
||||
if (interest < beast::zero)
|
||||
interest = numZero;
|
||||
if (managementFee < beast::zero)
|
||||
managementFee = numZero;
|
||||
}
|
||||
|
||||
PaymentComponents
|
||||
computePaymentComponents(
|
||||
Asset const& asset,
|
||||
std::int32_t scale,
|
||||
Number const& totalValueOutstanding,
|
||||
PaymentComponents
|
||||
computePaymentComponents(
|
||||
Asset const& asset,
|
||||
|
||||
Reference in New Issue
Block a user