Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is this a bug?
Qt 6.11 is out! See what's new in the release blog

Is this a bug?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    majkell
    wrote on last edited by
    #1

    I don't know if this is the right place to ask, but... this piece of code should give me result 0, instead it is 0.7...

    @
    QVector3D(0.5, 0.5, 0).distanceToLine(QVector3D(1, 0, 0),(QVector3D(0, 1, 0)-QVector3D(1, 0, 0)))
    @

    What am I doing wrong? Or this is a nasty bug?

    [EDIT: code formatting, Volker]

    1 Reply Last reply
    0
    • M Offline
      M Offline
      minimoog77
      wrote on last edited by
      #2

      Direction vector should be unit vector (normalized vector).

      1 Reply Last reply
      0
      • M Offline
        M Offline
        majkell
        wrote on last edited by
        #3

        Thanks, I realized it myself around 3am :)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved