phetsims / kite

A library for creating, manipulating and displaying 2D shapes in JavaScript.
http://scenerystack.org/
MIT License
15 stars 6 forks source link

parseFloat called with radix argument #68

Closed pixelzoom closed 7 years ago

pixelzoom commented 7 years ago

parseFloat is used in svgPath.js with a radix argument, i.e.:

2093 result0 = (function( offset, number ) { return parseFloat( number, 10 ); })( pos0, result0 );

2134 result0 = (function( offset, sign, number ) { return parseFloat( sign + number, 10 ); })( pos0, result0[ 0 ], result0[ 1 ] );

parseFloat does not have a radix parameter, someone is confusing it with parseInt.

svgPath.js looks like generated code, so perhaps we shouldn't worry about it. But I'm not familiar with what the thing that generated it ("Generated by PEG.js 0.7.0.") or how it was generated.

@jonathanolson your call.

jonathanolson commented 7 years ago

Fixed and made it a multi-line comment for increased visibility. Look good?

pixelzoom commented 7 years ago

👍 Closing.