mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
#809: Throw a more clear error for BlockIterators with zero direction, add Vector#isZero()
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
@@ -122,4 +122,14 @@ public class VectorTest {
|
||||
|
||||
assertTrue(Double.isFinite(a.angle(b)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsZero() {
|
||||
assertTrue(new Vector().isZero());
|
||||
assertTrue(new Vector(0, 0, 0).isZero());
|
||||
|
||||
Vector vector = new Vector(1, 2, 3);
|
||||
vector.zero();
|
||||
assertTrue(vector.isZero());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user