This repository was archived by the owner on Dec 28, 2024. It is now read-only.
This repository was archived by the owner on Dec 28, 2024. It is now read-only.
Overflow when using values too large for integers #1
Open
Description
Using large integers in the input paths gives overflowed values in the results. This seems to be solved by removing some casts from the library.
In ClipperOffset.java, there are casts to int, where the expected type is long. These casts can be removed:
destPoly.add( new LongPoint( (int) Math.round( srcPoly.get( 0 ).getX() + X * delta ), (int) Math.round( srcPoly.get( 0 ).getY() + Y * delta ) ) );
also in Edge.java:
return (int) (edge.getBot().getX() + Math.round( edge.deltaX * (currentY - edge.getBot().getY()) ));
Metadata
Metadata
Assignees
Labels
No labels