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