Copy-Paste
V501 There are identical sub-expressions to the left and to the right of the ‘-‘ operator: q2.v.z – q2.v.z entitynode.cpp 93
bool CompareRotation(const Quat& q1, const Quat& q2, float epsilon) { return (fabs_tpl(q1.v.x - q2.v.x) <= epsilon) && (fabs_tpl(q1.v.y - q2.v.y) <= epsilon) && (fabs_tpl(q2.v.z - q2.v.z) <= epsilon) && (fabs_tpl(q1.w - q2.w) <= epsilon); }
A mistyped digit is probably one of the most annoying typos one can make. In the function above, the analyzer detected a suspicious expression, (q2.v.z – q2.v.z), where variables q1 and q2 seem to have been mixed up.
Please click here to see more bugs from this project.