diff options
Diffstat (limited to 'loans.h')
| -rw-r--r-- | loans.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -3,6 +3,20 @@ #include <math.h> #include "contract.h" +typedef enum loan_type { + BULLET, + STRAIGHTLINE, + MORTGAGE, +} loan_type; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +typedef struct loan { + loan_type type; + contract *c; +} loan; +#pragma clang diagnostic pop + /**** BULLET LOAN ****/ contract *bullet_init(int n, int d, float r, float P); float bullet_update(contract *); @@ -17,3 +31,8 @@ void sl_free(contract *); contract *mort_init(int n, int d, float r, float P); float mort_update(contract *); void mort_free(contract *); + +/**** GENERAL LOAN STUFF ****/ +loan loan_init(loan_type type, int n, int d, float r, float P); +float loan_update(loan); +void loan_free(loan); |
