mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
refactor
This commit is contained in:
parent
1a27de190f
commit
c97b5a9ed0
@ -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) :
|
||||
|
Loading…
x
Reference in New Issue
Block a user