compound
This crate calculates the value of the initial investment based on rates of return (daily, monthly, semi-annual, annual...) :moneybag:.
Usage
extern crate compound;
use compound;
How to include it in your project
In your project's Cargo.toml
include the package name and version under like so:
= "0.1.0"
compound
Raison d'être
To make the calculation of how much your investment is worth super easy. Just pass in the initial investment and the array of percentage returns by (a slice or vector) by reference Algorithm complexity O(n).
Super important: all values inside the vector or slice need to be floats (f64) otherwise your operation will fail.
Super Light (5 sloc). No dependencies.
License
MIT © Mohamed Hayibor