Skip to content
0
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
Collapse
SAMSON Forum
  1. Home
  2. Develop
  3. Apps
  4. Conversion from radian to degree does not work

Conversion from radian to degree does not work

Scheduled Pinned Locked Moved Apps
4 Posts 3 Posters 4.2k 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.
  • K
    K
    Khoa
    wrote on last edited by
    #1
    SBQuantity::radian radianValue(1.5);
    SBQuantity::degree degreeValue = radianValue;
    double val = degreeValue.getValue();
    

    I've got val equal to 1.5 !!!
    Perhaps it is a bug ?

    1 Reply Last reply
    0
    • DmitriyMarinD
      DmitriyMarinD
      DmitriyMarin
      wrote on last edited by
      #2

      Actually, SBQuantity::radian, SBQuantity::degree, and SBQuantity::steradian are internally the same - they are SBQuantity::dimensionless. Therefore, there is no possibility to do a conversion like that, you need to convert radians into degrees yourself.

      Dmitriy,
      The SAMSON Team, https://s-c.io

      1 Reply Last reply
      0
      • StephaneS
        StephaneS
        Stephane
        wrote on last edited by
        #3

        Note that there are two ratios provided with the SDK: SBConstant::DegToRag and SBConstant::RadToDeg.

        1 Reply Last reply
        1
        • K
          K
          Khoa
          wrote on last edited by Khoa
          #4

          Thanks.
          It helps.

          SBQuantity::radian radianValue(1.5);
          SBQuantity::degree degreeValue = radianValue * SBConstant::RadToDeg;
          
          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Login or register to search.
          • First post
            Last post