Loss of precision of integers
Closed this issue · 0 comments
Lignium commented
This method calls a constructor that takes a float, which causes some numbers such as 29,999,999 to become 30,000,000.
Test code that reproduces the bug:
Vector3i blockPosition = Vector3i.from(29999999, 0, 0);
System.out.println(blockPosition);
System.out.println(blockPosition.toDouble().toInt());
Output:
(29999999, 0, 0)
(30000000, 0, 0)