- if (fabs(aValueAttr->value() - anAngleDirect) < TOLERANCE) {
- // Nothing to do.
- // This case is empty and going the first to check the direct angle before the others.
+ if (isDirect && aDirectDiff < TOLERANCE) {
+ aType = THE_ANGLE_DIRECT;
+ }
+ else if (isComplementary && aComplementaryDiff < TOLERANCE)
+ aType = THE_ANGLE_SUPPLEMENTARY;
+ else if (isBackward && aBackwardDiff < TOLERANCE)
+ aType = THE_ANGLE_BACKWARD;
+ else {
+ if (aComplementaryDiff < aDirectDiff && aComplementaryDiff < aBackwardDiff)
+ aType = THE_ANGLE_SUPPLEMENTARY;
+ else if (aBackwardDiff < aDirectDiff && aBackwardDiff < aComplementaryDiff)
+ aType = THE_ANGLE_BACKWARD;
+ else
+ aType = THE_ANGLE_DIRECT;