Fixed incorrect method call.
Added tests to make sure that this doesn't happen.
This commit is contained in:
parent
6ac686b86c
commit
39381f07f9
@ -67,6 +67,6 @@ public class Utilities {
|
||||
}
|
||||
|
||||
public static Point2 worldToLocalChunkCoordinates(Point2 worldCoordinates) {
|
||||
return worldToChunkCoordinates(worldCoordinates.x, worldCoordinates.y);
|
||||
return worldToLocalChunkCoordinates(worldCoordinates.x, worldCoordinates.y);
|
||||
}
|
||||
}
|
@ -74,10 +74,12 @@ public class UtilitiesTest {
|
||||
@Test
|
||||
public void testWorldToLocalCoordinatesNegative() {
|
||||
assertEquals(new Point2(2, 5), Utilities.worldToLocalChunkCoordinates(-62, -27));
|
||||
assertEquals(new Point2(2, 5), Utilities.worldToLocalChunkCoordinates(new Point2(-62, -27)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWorldToLocalCoordinatesPositive() {
|
||||
assertEquals(new Point2(7, 3), Utilities.worldToLocalChunkCoordinates(39, 83));
|
||||
assertEquals(new Point2(7, 3), Utilities.worldToLocalChunkCoordinates(new Point2(39, 83)));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user