From 7a4f2e73addf6dfcde2a6b17b62b961608e556a0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 9 Nov 2024 15:11:11 -0500 Subject: Rename `from_text()` to `parse()` --- stdlib/nums.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stdlib/nums.c') diff --git a/stdlib/nums.c b/stdlib/nums.c index 30973fbc..8a210d7e 100644 --- a/stdlib/nums.c +++ b/stdlib/nums.c @@ -61,7 +61,7 @@ public CONSTFUNC double Num$mix(double amount, double x, double y) { return (1.0-amount)*x + amount*y; } -public OptionalNum_t Num$from_text(Text_t text) { +public OptionalNum_t Num$parse(Text_t text) { const char *str = Text$as_c_string(text); char *end = NULL; double d = strtod(str, &end); @@ -138,7 +138,7 @@ public CONSTFUNC float Num32$mix(float amount, float x, float y) { return (1.0f-amount)*x + amount*y; } -public OptionalNum32_t Num32$from_text(Text_t text) { +public OptionalNum32_t Num32$parse(Text_t text) { const char *str = Text$as_c_string(text); char *end = NULL; double d = strtod(str, &end); -- cgit v1.2.3