diff --git a/src/userinput.c b/src/userinput.c index f57d0b0..4b641fa 100644 --- a/src/userinput.c +++ b/src/userinput.c @@ -7,6 +7,7 @@ #include #include #include +#include #define LD(name)\ long double name##ldvalue;\ @@ -208,4 +209,12 @@ unsigned long long getull(char *message, unsigned long long *min, unsigned long LD(min) LD(max) return getNumber(message, minld, maxld, NULL, NULL, 0, ULLONG_MAX); +} + +double getlf(char *message, double *min, double *max, double *greaterThan, double *smallerThan) { + LD(min) + LD(max) + LD(greaterThan) + LD(smallerThan) + return getNumber(message, minld, maxld, greaterThanld, smallerThanld, -DBL_MAX, DBL_MAX); } \ No newline at end of file