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

    c4d.utils.RangeMap clampval funkyness

    Cinema 4D SDK
    r20 python
    2
    2
    274
    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.
    • ferdinandF
      ferdinand
      last edited by Manuel

      Hi,

      I found this behavior rather puzzling, you might want to clarify the effect of clampval in the docs if you deem this behavior correct or alternatively make it clearer, that the function is not intended to be used with inverted output intervals.

      >>> # We would expect 0.0
      >>> c4d.utils.RangeMap(.5, 0., 1., -1., 1., False)
      0.0
      >>> # We would expect 0.0
      >>> c4d.utils.RangeMap(.5, 0., 1., -1., 1., True)
      0.0
      >>> # We would expect 0.0
      >>>  c4d.utils.RangeMap(.5, 0., 1., 1., -1., False)
      0.0
      >>> # We would expect 0.0
      >>>  c4d.utils.RangeMap(.5, 0., 1., 1., -1., True)
      1.0
      >>> # Whoops ...
      

      Cheers,
      zipit

      MAXON SDK Specialist
      developers.maxon.net

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by Manuel

        Hi,

        thanks a lot. I've opened a bug entry for that one. It will be fixed in a futur release.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

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