main/src/georegression/metric/UtilAngle.java
public static double minus( double angA, double angB ) {
		double diff = angA - angB;

		if( diff > Math.PI ) {
			return GrlConstants.PI2 - diff;
		} else if( diff < -Math.PI )
			return -GrlConstants.PI2 - diff;

		return diff;
	}
public static double minus( double angA, double angB ) {
		double diff = angA - angB;

		if( diff > Math.PI ) {
			return GrlConstants.PI2 - diff;
		} else if( diff < -Math.PI )
			return -GrlConstants.PI2 - diff;

		return diff;
	}
public static double minus ( double angA , double angB ) { double diff = angA - angB ; if ( diff > Math . PI ) { return GrlConstants . PI2 - diff ; } else if ( diff < - Math . PI ) return - GrlConstants . PI2 - diff ; return diff ; }
<p>
Returns the difference between two angles and bounds the result between -pi and pi:<br>
result = angA - angB<br>
and takes in account boundary conditions.
</p>

@param angA first angle.  Must be between -pi and pi.
@param angB second angle. Must be between -pi and pi.
@return an angle between -pi and pi
<p > Returns the difference between two angles and bounds the result between - pi and pi : <br > result = angA - angB<br > and takes in account boundary conditions . < / p >