From bdca4fc6e1d3a9ce1306313528067f012a60341b Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 30 Oct 2024 13:59:15 -0400 Subject: Fix header inline functions to use `extern inline` and some GCC magic --- stdlib/nums.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stdlib/nums.h') diff --git a/stdlib/nums.h b/stdlib/nums.h index b03d5519..fc6d804f 100644 --- a/stdlib/nums.h +++ b/stdlib/nums.h @@ -30,7 +30,7 @@ double Num$nan(Text_t tag); double Num$random(void); CONSTFUNC double Num$mix(double amount, double x, double y); OptionalNum_t Num$from_text(Text_t text); -CONSTFUNC static inline double Num$clamped(double x, double low, double high) { +MACROLIKE CONSTFUNC double Num$clamped(double x, double low, double high) { return (x <= low) ? low : (x >= high ? high : x); } extern const TypeInfo_t Num$info; @@ -49,7 +49,7 @@ float Num32$random(void); CONSTFUNC float Num32$mix(float amount, float x, float y); OptionalNum32_t Num32$from_text(Text_t text); float Num32$nan(Text_t tag); -CONSTFUNC static inline float Num32$clamped(float x, float low, float high) { +MACROLIKE CONSTFUNC float Num32$clamped(float x, float low, float high) { return (x <= low) ? low : (x >= high ? high : x); } extern const TypeInfo_t Num32$info; -- cgit v1.2.3