Improved exponentiation

This commit is contained in:
Shoghi Cervantes
2014-09-29 13:24:25 +02:00
parent 85ff696ae5
commit 5b6b789ab3
7 changed files with 29 additions and 29 deletions

View File

@@ -695,7 +695,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$generateQueue = new ReversePriorityQueue();
for($X = -$radius; $X <= $radius; ++$X){
for($Z = -$radius; $Z <= $radius; ++$Z){
$distance = ($X * $X) + ($Z * $Z);
$distance = $X ** 2 + $Z ** 2;
if($distance > $radiusSquared){
continue;
}