Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-73952

QVector3D::normalized and QVector3D::normalize behave differently(!)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.9.7
    • Qt3D
    • None

      I'd expect it to be the case that

      QVector3D v = V;
      QVector3D vv = v.normalized();
      v.normalize();
      Q_ASSERT(v == vv);
      

      but the source code clearly shows that in the case that qFuzzyIsNull(len) (where len is really length squared), normalized will return the zero vector but normalize will not change its input.

      Related: QTBUG-73951

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            seanharmer Sean Harmer
            benfrantzdalefl benfrantzdalefl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes