SVGnest
SVGnest copied to clipboard
Simplification in _onSegment() function.
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.