16 tfloat tAB = adjust_value_to_bounds( Tan( alpha1 - alpha2 ) , COT_MAX ) ;
17 tfloat tAC = adjust_value_to_bounds( Tan( alpha1 - alpha3 ) , COT_MAX ) ;
19 tfloat theta = -alpha1 + atan2( (x2*tAB*tAC + y2*tAC - y1*tAC - x3*tAB*tAC - y3*tAB + y1*tAB) , (x2*tAC - y2*tAB*tAC - x1*tAC - x3*tAB + y3*tAB*tAC + x1*tAB)) ;
21 tfloat tTA = adjust_value_to_bounds( Tan( theta + alpha1 ) , COT_MAX ) ;
22 tfloat tTB = adjust_value_to_bounds( Tan( theta + alpha2 ) , COT_MAX ) ;
24 tfloat K = 1 / ( tTA - tTB ) ;
26 *x = K * ( y2 - y1 + x1 * tTA - x2 * tTB ) ;
27 *y = K * ( tTA * tTB * ( x1 - x2 ) + y2 * tTA - y1 * tTB ) ;
double tfloat
Defines the type for float/double.