CryEngine V


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

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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.