src/main/java/de/javagl/geom/Lines.java
/**
     * Computes the angle, in radians, that the line
     * has to the x axis
     * 
     * @param line The line
     * @return The angle, in radians, that the line has to the x-axis
     */
Computes the angle, in radians, that the line
has to the x axis

@param line The line
@return The angle, in radians, that the line has to the x-axis
Computes the angle in radians that the line has to the x axis @param line The line @return The angle in radians that the line has to the x - axis
public static double angleToX(Line2D line)
    {
        return angleToX(
            line.getX1(), line.getY1(), 
            line.getX2(), line.getY2());
    }
public static double angleToX ( Line2D line ) { return angleToX ( line . getX1 ( ) , line . getY1 ( ) , line . getX2 ( ) , line . getY2 ( ) ) ; }
Computes the angle, in radians, that the line
 has to the x axis
Computes the angle in radians that the line has to the x axis