pocketmine\math\Vector2::distanceSquared PHP Method

distanceSquared() public method

public distanceSquared ( $x, $y )
    public function distanceSquared($x, $y = 0)
    {
        if ($x instanceof Vector2) {
            return $this->distanceSquared($x->x, $x->y);
        } else {
            return pow($this->x - $x, 2) + pow($this->y - $y, 2);
        }
    }