diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-05 18:20:54 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-05 18:20:54 -0500 |
| commit | 147e0f0269440fce15d6b88a8a90627f3a3b2df2 (patch) | |
| tree | bc33522ba71b5a2996fae22e102cce5046cf1333 /stdlib/nums.c | |
| parent | 2c4324670ff569ede360d13875c5e4b5720a626d (diff) | |
Overhaul of constructors, making it more consistent and correct. Also
changed T(), T, T_t, T_s type names to T(), T$$info, T$$type, T$$struct
for unambiguity
Diffstat (limited to 'stdlib/nums.c')
| -rw-r--r-- | stdlib/nums.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/nums.c b/stdlib/nums.c index 47eb6851..b227ccb8 100644 --- a/stdlib/nums.c +++ b/stdlib/nums.c @@ -50,11 +50,11 @@ public CONSTFUNC bool Num$near(double a, double b, double ratio, double absolute } public Text_t Num$format(double f, Int_t precision) { - return Text$format("%.*f", (int)Int_to_Int64(precision, false), f); + return Text$format("%.*f", (int)Int64$from_int(precision, false), f); } public Text_t Num$scientific(double f, Int_t precision) { - return Text$format("%.*e", (int)Int_to_Int64(precision, false), f); + return Text$format("%.*e", (int)Int64$from_int(precision, false), f); } public CONSTFUNC double Num$mod(double num, double modulus) { @@ -125,11 +125,11 @@ public CONSTFUNC bool Num32$near(float a, float b, float ratio, float absolute) } public Text_t Num32$format(float f, Int_t precision) { - return Text$format("%.*f", (int)Int_to_Int64(precision, false), (double)f); + return Text$format("%.*f", (int)Int64$from_int(precision, false), (double)f); } public Text_t Num32$scientific(float f, Int_t precision) { - return Text$format("%.*e", (int)Int_to_Int64(precision, false), (double)f); + return Text$format("%.*e", (int)Int64$from_int(precision, false), (double)f); } public CONSTFUNC float Num32$mod(float num, float modulus) { |
