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

		if( diff > GrlConstants.F_PI ) {
			return GrlConstants.F_PI2 - diff;
		} else if( diff < -GrlConstants.F_PI )
			return -GrlConstants.F_PI2 - diff;

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

		if( diff > GrlConstants.F_PI ) {
			return GrlConstants.F_PI2 - diff;
		} else if( diff < -GrlConstants.F_PI )
			return -GrlConstants.F_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