public function moveRight($distance) 
    {
        // Ortogonal direction vector
        $rx = -$this->ry;
        $ry = $this->rx;
        
        $multiplier = $distance / sqrt($rx * $rx + $ry * $ry);

        $this->Px += $rx * $multiplier;
        $this->Py += $ry * $multiplier;
    }
public function moveRight($distance) 
    {
        // Ortogonal direction vector
        $rx = -$this->ry;
        $ry = $this->rx;
        
        $multiplier = $distance / sqrt($rx * $rx + $ry * $ry);

        $this->Px += $rx * $multiplier;
        $this->Py += $ry * $multiplier;
    }
public function moveRight ( $ distance ) { // Ortogonal direction vector $ rx = - $ this -> ry ; $ ry = $ this -> rx ; $ multiplier = $ distance / sqrt ( $ rx * $ rx + $ ry * $ ry ) ; $ this -> Px += $ rx * $ multiplier ; $ this -> Py += $ ry * $ multiplier ; }
Moves the line to the right relative the direction vector.

@param float $distance  The number of pixels to move the line.
Moves the line to the right relative the direction vector .