diff options
Diffstat (limited to 'core/src/ch/asynk/gdx')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java index 35bfac5..cdae57b 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java @@ -444,7 +444,7 @@ public class HexBoard implements Board { float dx = to.cx - from.cx; float dy = to.cy - from.cy; - float m = dy / dx; + float m = (dx == 0 ? Float.MAX_VALUE : dy / dx); float c = from.cy - (m * from.cx); if (vertical) { if (o == Orientation.N) { |