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

Numerical instability with QLineF::intersect and QLineF::BoundedIntersection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.6.3, 5.12.0
    • Core: Other
    • None
    • macOS, Windows

      When trying to intersect (almost) parallel lines, QLineF::intersect may return the intersection type incorrectly as QLineF::BoundedIntersection when it is actually QLineF::UnboundedIntersection (or QLineF::NoIntersection)

      Since the values in the debugger are converted from double and are not the same as in memory, I dumped the memory values and attached the images. I also created a test code that demonstrates the issue.

        1. debugInfo.png
          debugInfo.png
          447 kB
        2. l.png
          l.png
          23 kB
        3. l1.png
          l1.png
          31 kB
        4. lines.png
          lines.png
          348 kB
        5. main.cpp
          0.5 kB
        6. testIntersect.cpp
          1 kB
        For Gerrit Dashboard: QTBUG-75146
        # Subject Branch Project Status CR V

            thiago Thiago Macieira
            ahi Adriel Jr.
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change