public static double getAngle ( double xDiff , double yDiff ) { double angle = 0 ; // logger.debug("getAngle->xDiff: " + xDiff); // logger.debug("getAngle->yDiff: " + yDiff); if ( xDiff >= 0 && yDiff >= 0 ) { angle = Math . atan ( yDiff / xDiff ) ; } else if ( xDiff < 0 && yDiff >= 0 ) { angle = Math . PI + Math . atan ( yDiff / xDiff ) ; } else if ( xDiff < 0 && yDiff < 0 ) { angle = Math . PI + Math . atan ( yDiff / xDiff ) ; } else if ( xDiff >= 0 && yDiff < 0 ) { angle = 2 * Math . PI + Math . atan ( yDiff / xDiff ) ; } return angle ; }
Gets the angle attribute of the GeometryTools class .