Level: Change isInWorld signature to use ints instead of floats

this is only used in one place, where it's being given floats, and it's 10% faster to use int for this because it won't convert it.

It is also 25% faster to remove typehints and 60% faster to inline it. We really need a proper PHP preprocessor for inlining.
This commit is contained in:
Dylan K. Taylor
2018-05-18 11:01:13 +01:00
parent 22b91aaa24
commit 29fd26627e
3 changed files with 6 additions and 6 deletions

View File

@ -142,11 +142,11 @@ interface ChunkManager{
* Returns whether the specified coordinates are within the valid world boundaries, taking world format limitations
* into account.
*
* @param float $x
* @param float $y
* @param float $z
* @param int $x
* @param int $y
* @param int $z
*
* @return bool
*/
public function isInWorld(float $x, float $y, float $z) : bool;
public function isInWorld(int $x, int $y, int $z) : bool;
}