From 2c380f8df666fcebd979511f33e7d72291b389cd Mon Sep 17 00:00:00 2001 From: gonzo Date: Fri, 19 May 2023 22:28:10 +0200 Subject: moved from floats to doubles for added precision --- loans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loans.c') 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); -- cgit v1.2.3