public function getAngle($X1, $Y1, $X2, $Y2)
    {
        $Opposite = $Y2 - $Y1;
        $Adjacent = $X2 - $X1;
        $Angle = rad2deg(atan2($Opposite, $Adjacent));

        return $Angle > 0 ? $Angle : 360 - abs($Angle);
    }
public function getAngle($X1, $Y1, $X2, $Y2)
    {
        $Opposite = $Y2 - $Y1;
        $Adjacent = $X2 - $X1;
        $Angle = rad2deg(atan2($Opposite, $Adjacent));

        return $Angle > 0 ? $Angle : 360 - abs($Angle);
    }
public function getAngle ( $ X1 , $ Y1 , $ X2 , $ Y2 ) { $ Opposite = $ Y2 - $ Y1 ; $ Adjacent = $ X2 - $ X1 ; $ Angle = rad2deg ( atan2 ( $ Opposite , $ Adjacent ) ) ; return $ Angle > 0 ? $ Angle : 360 - abs ( $ Angle ) ; }
Return the angle made by a line and the X axis
@param int $X1
@param int $Y1
@param int $X2
@param int $Y2
@return int|float
Return the angle made by a line and the X axis