diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-30 13:59:15 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-30 13:59:15 -0400 |
| commit | bdca4fc6e1d3a9ce1306313528067f012a60341b (patch) | |
| tree | b49af20b040d1fe893b81c70c8b0ba19cecb6ca3 /stdlib/nums.h | |
| parent | a0178a1e0ccfd706f6d69b5b4a876f1ee70cdc28 (diff) | |
Fix header inline functions to use `extern inline` and some GCC magic
Diffstat (limited to 'stdlib/nums.h')
| -rw-r--r-- | stdlib/nums.h | 4 |
1 files changed, 2 insertions, 2 deletions
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; |
