We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8a420b commit b8117afCopy full SHA for b8117af
src/main/scala/com/truelaurel/math/geometry/Pos.scala
@@ -11,6 +11,10 @@ case class Pos(x: Int, y: Int) {
11
12
def +(pos: Pos): Pos = Pos(x + pos.x, y + pos.y)
13
14
+ def /(r: Int): Pos = Pos(x / r, y / r)
15
+
16
+ def %(r: Int): Pos = Pos(x % r, y % r)
17
18
def neighborIn(direction: Direction): Pos = direction match {
19
case N => Pos(x, y - 1)
20
case S => Pos(x, y + 1)
0 commit comments