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. qSin oddity
Forum Updated to NodeBB v4.3 + New Features

qSin oddity

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 562 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.
  • pauleddP Offline
    pauleddP Offline
    pauledd
    wrote on last edited by
    #1

    I am sure qSin does what it should so what am I doing wrong?
    My fancy casio calculator says (deg mode):
    sin(0.72)=0,012...
    qSin says:
    sin(0.72)=0.659... okay, is obviously in rad so I convert it to deg
    qRadiansToDegrees(qSin(0.72))=37.78
    wth...

    J.HilkJ JohanSoloJ 2 Replies Last reply
    0
    • pauleddP pauledd

      I am sure qSin does what it should so what am I doing wrong?
      My fancy casio calculator says (deg mode):
      sin(0.72)=0,012...
      qSin says:
      sin(0.72)=0.659... okay, is obviously in rad so I convert it to deg
      qRadiansToDegrees(qSin(0.72))=37.78
      wth...

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by J.Hilk
      #2

      @pauledd
      seems like your calculator is wrong

      ea3bc615-f7c7-43a3-ac48-83e17998913a-image.png


      actually your Casio is in rads, where as qt is in deg.
      so RadiansToDegrees seems like the wrong conversion, don't you think so :)


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3
      • pauleddP pauledd

        I am sure qSin does what it should so what am I doing wrong?
        My fancy casio calculator says (deg mode):
        sin(0.72)=0,012...
        qSin says:
        sin(0.72)=0.659... okay, is obviously in rad so I convert it to deg
        qRadiansToDegrees(qSin(0.72))=37.78
        wth...

        JohanSoloJ Offline
        JohanSoloJ Offline
        JohanSolo
        wrote on last edited by JohanSolo
        #3

        @pauledd said in qSin oddity:

        qRadiansToDegrees(qSin(0.72))=37.78
        wth...

        For the record, it's the other way around: qSin(qRadiansToDegrees(0.72))...

        `They did not know it was impossible, so they did it.'
        -- Mark Twain

        pauleddP 1 Reply Last reply
        1
        • JohanSoloJ JohanSolo

          @pauledd said in qSin oddity:

          qRadiansToDegrees(qSin(0.72))=37.78
          wth...

          For the record, it's the other way around: qSin(qRadiansToDegrees(0.72))...

          pauleddP Offline
          pauleddP Offline
          pauledd
          wrote on last edited by
          #4

          My calculator is not wrong:
          Bildschirmfoto_2019-11-28_11-57-52.png

          @JohanSolo said in qSin oddity:

          @pauledd said in qSin oddity:

          qRadiansToDegrees(qSin(0.72))=37.78
          wth...

          For the record, it's the other way around: qSin(qRadiansToDegrees(0.72))...

          qSin(qRadiansToDegrees(0.72)) gives -0.400678
          qSin(qDegreesToRadians( 0.72)) gives 0.012566 (what I want)

          thanks

          KroMignonK 1 Reply Last reply
          0
          • pauleddP pauledd

            My calculator is not wrong:
            Bildschirmfoto_2019-11-28_11-57-52.png

            @JohanSolo said in qSin oddity:

            @pauledd said in qSin oddity:

            qRadiansToDegrees(qSin(0.72))=37.78
            wth...

            For the record, it's the other way around: qSin(qRadiansToDegrees(0.72))...

            qSin(qRadiansToDegrees(0.72)) gives -0.400678
            qSin(qDegreesToRadians( 0.72)) gives 0.012566 (what I want)

            thanks

            KroMignonK Offline
            KroMignonK Offline
            KroMignon
            wrote on last edited by
            #5

            @pauledd said in qSin oddity:

            qSin(qRadiansToDegrees(0.72)) gives -0.400678
            qSin(qDegreesToRadians( 0.72)) gives 0.012566 (what I want)

            As you can see in qSin documentation, angle must be given in radian. So it is normal that qSin(qRadiansToDegrees(0.72)) do NOT work!

            It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

            1 Reply Last reply
            4
            • pauleddP Offline
              pauleddP Offline
              pauledd
              wrote on last edited by pauledd
              #6

              Yes thanks, I was quite confused by
              "Returns the sine of the angle v in radians."

              That made me conclude the return value is in radians, not the value that I pass... D'oh!!

              1 Reply Last reply
              1

              • Login

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