Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Decimal

    PYTHON Development
    0
    4
    962
    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 19/01/2011 at 16:42, xxxxxxxx wrote:

      Hi,
      does anyones know how to change the decimal precision of vector's number? I'm tryng to read a cloud of points from an external ascii document and is very important to have a least of 8 decimals. 
      It seems to me that cinema 4d work always with 3 decimals. Is it possible to increase the accuracy?

      I've found this command "getcontext().prec = n" in a python documentation but doesn't work.

      Anyone got any ideas?

      Thank you.

      Luther

      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 20/01/2011 at 02:37, xxxxxxxx wrote:

        Hi, the numbers are just cut off for the user. Internally C4D uses double precision.

        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 20/01/2011 at 07:44, xxxxxxxx wrote:

          Hi,
          thank you for your answer. I had guessed as much! Is ti possible in python to unlock this limitation, for example when I print the coordinates of a vector?

          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 20/01/2011 at 14:16, xxxxxxxx wrote:

            Printing the coordinates of a vector should be fine from scratch:

            p=c4d.Vector(1.2345678)
            print p.x #output 1.2345678
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post