| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* Automatically generated code, do not edit */ | ||
| 2 | /* Generated from source file: orient2d.pck */ | ||
| 3 | |||
| 4 | 19284567 | inline int orient_2d_filter( const double* p0, const double* p1, const double* p2) { | |
| 5 | double a11; | ||
| 6 | 19284567 | a11 = (p1[0] - p0[0]); | |
| 7 | double a12; | ||
| 8 | 19284567 | a12 = (p1[1] - p0[1]); | |
| 9 | double a21; | ||
| 10 | 19284567 | a21 = (p2[0] - p0[0]); | |
| 11 | double a22; | ||
| 12 | 19284567 | a22 = (p2[1] - p0[1]); | |
| 13 | double Delta; | ||
| 14 | 19284567 | Delta = ((a11 * a22) - (a12 * a21)); | |
| 15 | int int_tmp_result; | ||
| 16 | double eps; | ||
| 17 | 19284567 | double max1 = fabs(a11); | |
| 18 |
2/2✓ Branch 0 taken 10653862 times.
✓ Branch 1 taken 8630705 times.
|
19284567 | if( (max1 < fabs(a12)) ) |
| 19 | { | ||
| 20 | 10653862 | max1 = fabs(a12); | |
| 21 | } | ||
| 22 | 19284567 | double max2 = fabs(a21); | |
| 23 |
2/2✓ Branch 0 taken 10476615 times.
✓ Branch 1 taken 8807952 times.
|
19284567 | if( (max2 < fabs(a22)) ) |
| 24 | { | ||
| 25 | 10476615 | max2 = fabs(a22); | |
| 26 | } | ||
| 27 | double lower_bound_1; | ||
| 28 | double upper_bound_1; | ||
| 29 | 19284567 | lower_bound_1 = max1; | |
| 30 | 19284567 | upper_bound_1 = max1; | |
| 31 |
2/2✓ Branch 0 taken 9694287 times.
✓ Branch 1 taken 9590280 times.
|
19284567 | if( (max2 < lower_bound_1) ) |
| 32 | { | ||
| 33 | 9694287 | lower_bound_1 = max2; | |
| 34 | } | ||
| 35 | else | ||
| 36 | { | ||
| 37 |
2/2✓ Branch 0 taken 8893205 times.
✓ Branch 1 taken 697075 times.
|
9590280 | if( (max2 > upper_bound_1) ) |
| 38 | { | ||
| 39 | 8893205 | upper_bound_1 = max2; | |
| 40 | } | ||
| 41 | } | ||
| 42 |
2/2✓ Branch 0 taken 712296 times.
✓ Branch 1 taken 18572271 times.
|
19284567 | if( (lower_bound_1 < 5.00368081960964635413e-147) ) |
| 43 | { | ||
| 44 | 712296 | return FPG_UNCERTAIN_VALUE; | |
| 45 | } | ||
| 46 | else | ||
| 47 | { | ||
| 48 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 18572271 times.
|
18572271 | if( (upper_bound_1 > 1.67597599124282407923e+153) ) |
| 49 | { | ||
| 50 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 51 | } | ||
| 52 | 18572271 | eps = (8.88720573725927976811e-16 * (max1 * max2)); | |
| 53 |
2/2✓ Branch 0 taken 9399405 times.
✓ Branch 1 taken 9172866 times.
|
18572271 | if( (Delta > eps) ) |
| 54 | { | ||
| 55 | 9399405 | int_tmp_result = 1; | |
| 56 | } | ||
| 57 | else | ||
| 58 | { | ||
| 59 |
2/2✓ Branch 0 taken 8699965 times.
✓ Branch 1 taken 472901 times.
|
9172866 | if( (Delta < -eps) ) |
| 60 | { | ||
| 61 | 8699965 | int_tmp_result = -1; | |
| 62 | } | ||
| 63 | else | ||
| 64 | { | ||
| 65 | 472901 | return FPG_UNCERTAIN_VALUE; | |
| 66 | } | ||
| 67 | } | ||
| 68 | } | ||
| 69 | 18099370 | return int_tmp_result; | |
| 70 | } | ||
| 71 |