You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a command in d has an exponent Eg: "15 -1.1368683772161603e-13"
It gets decoded by the first parseFloats() regex as:
[ "15", "-1.1368683772161603e", "-13"] and not
[ "15", "-1.1368683772161603e-13"]
Which leads to the second arg being set to -1.13... instead of something closer to 0.
FIX: I've changed the line
var array = string.split( /[\s,]+|(?=\s?[+-])/ );
to
var array = string.split( /[\s,]+|(?=\s?(?<![eE])[+-])/ )
Which adds a lookback to [+-] and won't match if either is preceeded by 'e|E'.
It seems to work for me.
The text was updated successfully, but these errors were encountered:
SVGLoader bug: parseFloats() ~ line 893
When a command in d has an exponent Eg: "15 -1.1368683772161603e-13"
It gets decoded by the first parseFloats() regex as:
[ "15", "-1.1368683772161603e", "-13"] and not
[ "15", "-1.1368683772161603e-13"]
Which leads to the second arg being set to -1.13... instead of something closer to 0.
FIX: I've changed the line
var array = string.split( /[\s,]+|(?=\s?[+-])/ );
to
var array = string.split( /[\s,]+|(?=\s?(?<![eE])[+-])/ )
Which adds a lookback to [+-] and won't match if either is preceeded by 'e|E'.
It seems to work for me.
The text was updated successfully, but these errors were encountered: