Closed volodalexey closed 1 year ago
When I generate rectangle with pointY I see confused results.
pointY
To Reproduce Try to generate pointY rectangle with 2 columns and 3 rows:
for hex in shapes::pointy_rectangle([0, 1, 0, 2]) { println!("hex ({}, {})", hex.x, hex.y); }
Actual result:
hex (0, 0) hex (1, 0) hex (0, 1) hex (1, 1) hex (-1, 2) hex (0, 2)
As you can see, 3rd row begins with confused numbers -1, 2
-1, 2
Expected behavior According to this link I should see following 3rd row:
hex (0, 2) hex (1, 2)
Screenshots Or Code snippet Picture from above link:
Is this an issue or am I doing something wrong?
Hex uses axial coordinates, not offset ones like you linked. You can convert between coordinate systems if you wish.
Hex
The coordinates returned by pointy_rectangle are correct
pointy_rectangle
@ManevilleF Thanks! Now I see where is the problem.
When I generate rectangle with
pointY
I see confused results.To Reproduce Try to generate pointY rectangle with 2 columns and 3 rows:
Actual result:
As you can see, 3rd row begins with confused numbers
-1, 2
Expected behavior According to this link I should see following 3rd row:
Screenshots Or Code snippet Picture from above link:
Is this an issue or am I doing something wrong?