We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call to Hexagon.getExternalBoundingBox() returns a negative value for height.
``@Test public void negativeHeight() { HexagonalGridBuilder builder = new HexagonalGridBuilder() .setGridHeight(3) .setGridWidth(3) .setGridLayout(HexagonalGridLayout.HEXAGONAL) .setOrientation(HexagonOrientation.FLAT_TOP) .setRadius(138); HexagonalGrid grid = builder.build(); Hexagon hex = (Hexagon) grid.getHexagons().iterator().next(); Rectangle rect = hex.getExternalBoundingBox(); assertTrue(rect.getHeight()>0); // [207.0, 358.5, 276.0 ,-239.0] }```
The text was updated successfully, but these errors were encountered:
height for a flat top hex with a radius of 138 is sqrt(3)*138 = 239. Appears the magnitude is correct, just need to take the abs().
Sorry, something went wrong.
No branches or pull requests
call to Hexagon.getExternalBoundingBox() returns a negative value for height.
``@Test
public void negativeHeight() {
HexagonalGridBuilder builder = new HexagonalGridBuilder()
.setGridHeight(3)
.setGridWidth(3)
.setGridLayout(HexagonalGridLayout.HEXAGONAL)
.setOrientation(HexagonOrientation.FLAT_TOP)
.setRadius(138);
HexagonalGrid grid = builder.build();
Hexagon hex = (Hexagon) grid.getHexagons().iterator().next();
Rectangle rect = hex.getExternalBoundingBox();
assertTrue(rect.getHeight()>0); // [207.0, 358.5, 276.0 ,-239.0]
}```
The text was updated successfully, but these errors were encountered: