Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Problem Real->Long

    SDK Help
    0
    2
    241
    Loading More Posts
    • 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.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 12/07/2004 at 01:12, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.207 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I still have problems conversing real to long. I use GetPos() to get the position of an object, then something like LONG posx = GetPos().x; I even tried LONG posx = SAFELONG( GetPos().x );
      The result is the same: sometimes the values differ by 1! For example, the attribute manager says x position = 74, debug of vc says GetPos().x = 74.000....and posx = 73!
      I thought that SAFELONG would fix that, but it doesnt. I really need to understand why that happens, the real mathematic reason, and how I can fix it, 1 pixel in our application is extremely important!
      How does the attribute manager display the position? He always displays the correct position, somehow he also has to call GetPos()......

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 12/07/2004 at 02:49, xxxxxxxx wrote:

        Ok....thought SAFELONG would handle that, and the compiler would show the exact values.....
        +0.5/-0.5 and it works....

        1 Reply Last reply Reply Quote 0
        • First post
          Last post