pub struct FutureValuePaymentStream {
pub cash_income: f64,
pub interest_rate: f64,
pub time_periods: f64,
}
Expand description
Calculates the future value of a payment stream such as an annuity
§Example
use com_croftsoft_core::math::finance_lib::FutureValuePaymentStream;
assert_eq!(
FutureValuePaymentStream {
cash_income: 10_000.0, // Future payments of $10k per year
interest_rate: 0.10, // With 10% interest annually on the payments
time_periods: 10.0, // Paying each year for ten years
}.calculate(),
159_374.246_010_000_2); // Will be worth ~$159k in the future
Fields§
§cash_income: f64
Periodic cash income payment starting one period from today
interest_rate: f64
Periodic interest earned on income (use 0.01 for 1%)
time_periods: f64
Number of periods of cash income
Implementations§
Trait Implementations§
Source§impl Clone for FutureValuePaymentStream
impl Clone for FutureValuePaymentStream
Source§fn clone(&self) -> FutureValuePaymentStream
fn clone(&self) -> FutureValuePaymentStream
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FutureValuePaymentStream
impl Debug for FutureValuePaymentStream
impl Copy for FutureValuePaymentStream
Auto Trait Implementations§
impl Freeze for FutureValuePaymentStream
impl RefUnwindSafe for FutureValuePaymentStream
impl Send for FutureValuePaymentStream
impl Sync for FutureValuePaymentStream
impl Unpin for FutureValuePaymentStream
impl UnwindSafe for FutureValuePaymentStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more