summaryrefslogtreecommitdiffstats
path: root/loans.c
diff options
context:
space:
mode:
authorgonzo <gonzo@toniatuh.com>2023-05-19 22:28:10 +0200
committergonzo <gonzo@toniatuh.com>2023-05-19 22:28:10 +0200
commit2c380f8df666fcebd979511f33e7d72291b389cd (patch)
tree0238209fa73cfa7e4c0a8a58b3ffd8426c20db60 /loans.c
parent0751b55f611b889f63dfc2bc2705e7537703cb43 (diff)
downloadloan_calc-2c380f8df666fcebd979511f33e7d72291b389cd.tar.gz
moved from floats to doubles for added precision
Diffstat (limited to 'loans.c')
-rw-r--r--loans.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loans.c b/loans.c
index f812aaf..46a5100 100644
--- a/loans.c
+++ b/loans.c
@@ -1,7 +1,7 @@
#include "loans.h"
#include "stdio.h"
-loan loan_init(loan_type type, int n, int d, float r, float P) {
+loan loan_init(loan_type type, int n, int d, double r, double P) {
loan ret;
ret.type = type;
@@ -20,7 +20,7 @@ loan loan_init(loan_type type, int n, int d, float r, float P) {
return ret;
}
-float loan_update(loan l) {
+double loan_update(loan l) {
switch (l.type) {
case BULLET:
return bullet_update(l.c);