From c97b5a9ed08ab7b379ef4c5d7b82b31abd4756ec Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Tue, 3 May 2022 16:37:28 +0800 Subject: [PATCH] refactor --- src/util/_impl/_parse_number_impl.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/_impl/_parse_number_impl.scad b/src/util/_impl/_parse_number_impl.scad index 434ddec5..db0a9c36 100644 --- a/src/util/_impl/_parse_number_impl.scad +++ b/src/util/_impl/_parse_number_impl.scad @@ -4,7 +4,7 @@ use <../split_str.scad>; function _str_to_int(t) = ord(t) - 48; function _parse_positive_int(t, value = 0, i = 0) = - i == len(t) ? value : _parse_positive_int(t, value * pow(10, i) + _str_to_int(t[i]), i + 1); + i == len(t) ? value : _parse_positive_int(t, value * 10 ^ i + _str_to_int(t[i]), i + 1); function _parse_positive_number(t) = len(search(".", t)) == 0 ? _parse_positive_int(t) :