Skip to content

Commit

Permalink
Fixed hexagon view offset in stack pane. hexagon view is centered now.
Browse files Browse the repository at this point in the history
  • Loading branch information
abouzerda committed Dec 4, 2023
1 parent 9670668 commit a878703
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ object HexagonBuilder {
val points = mutableListOf<Double>()
var angle = 90.0
repeat(HEXAGON_SIDES) {
val x = size * cos(Math.toRadians(angle)) + size / 2 * sqrt(3.0)
val x = size * cos(Math.toRadians(angle)) + size
val y = size * sin(Math.toRadians(angle)) + size
angle += FULL_CIRCLE_DEGREES / HEXAGON_SIDES
points.add(x + offsetX.toDouble())
Expand Down

0 comments on commit a878703

Please sign in to comment.