From c72b0406a32ffc3f04324f7b6c321486762fca41 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 16 Aug 2025 17:21:01 -0400 Subject: Improved parsing and prefix/suffix matching using a `remainder` parameter --- src/stdlib/nums.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stdlib/nums.h') diff --git a/src/stdlib/nums.h b/src/stdlib/nums.h index fdd9e227..fe76d1c3 100644 --- a/src/stdlib/nums.h +++ b/src/stdlib/nums.h @@ -30,7 +30,7 @@ CONSTFUNC bool Num$finite(double n); CONSTFUNC bool Num$isnan(double n); double Num$nan(Text_t tag); CONSTFUNC double Num$mix(double amount, double x, double y); -OptionalNum_t Num$parse(Text_t text); +OptionalNum_t Num$parse(Text_t text, Text_t *remainder); CONSTFUNC bool Num$is_between(const double x, const double low, const double high); CONSTFUNC double Num$clamped(double x, double low, double high); MACROLIKE CONSTFUNC double Num$from_num32(Num32_t n) { return (double)n; } @@ -83,7 +83,7 @@ CONSTFUNC bool Num32$isinf(float n); CONSTFUNC bool Num32$finite(float n); CONSTFUNC bool Num32$isnan(float n); CONSTFUNC float Num32$mix(float amount, float x, float y); -OptionalNum32_t Num32$parse(Text_t text); +OptionalNum32_t Num32$parse(Text_t text, Text_t *remainder); float Num32$nan(Text_t tag); CONSTFUNC bool Num32$is_between(const float x, const float low, const float high); CONSTFUNC float Num32$clamped(float x, float low, float high); -- cgit v1.2.3