SVGnest icon indicating copy to clipboard operation
SVGnest copied to clipboard

Simplification in _onSegment() function.

Open 3bhady opened this issue 5 years ago • 0 comments

https://github.com/Jack000/SVGnest/blob/1248dc21efd3f90d1aa52ba5785e27e5217ed2c9/util/geometryutil.js#L53-L109

I think this can be replaced by a simple one liner : return _almostEqual( _distance(A,p) + _distance(B,p) , _distance(A, B)); with _distance(A,B) being a function that returns the distance between two points A,B. I've tested it and it's working fine.

3bhady avatar Jun 16 '19 05:06 3bhady