exyte / Macaw

Powerful and easy-to-use vector graphics Swift library with SVG support
MIT License
6.01k stars 554 forks source link

Fix polyline and polygon points parsing #687

Closed aapng closed 4 years ago

aapng commented 4 years ago

Handling of numbers in scientific notation in parsePoints used to be incorrect, because a number could be broken by an exponent minus sign, resulting in incorrect values.

E.g. '2.5e-1' -> '2.5e', '-1'.

String-splitting-based parsing is replaced with a simpler use of Scanner, otherwise keeping the behaviour, esp. error handling, unchanged.

ystrot commented 4 years ago

Thanks for your work!