protected static double change ( EllipseRotated_F64 a , EllipseRotated_F64 b ) { double total = 0 ; total += Math . abs ( a . center . x - b . center . x ) ; total += Math . abs ( a . center . y - b . center . y ) ; total += Math . abs ( a . a - b . a ) ; total += Math . abs ( a . b - b . b ) ; // only care about the change of angle when it is not a circle double weight = Math . min ( 4 , 2.0 * ( a . a / a . b - 1.0 ) ) ; total += weight * UtilAngle . distHalf ( a . phi , b . phi ) ; return total ; }
Computes a numerical value for the difference in parameters between the two ellipses