Start a new topic

Python Scripting Inquiry

Dear CM Labs Support,


Good Day eveyone!


I would like to know the function of this statement found on the scriptings.


def clamp(value, minValue, maxValue):
  clampedValue = max(min(value, maxValue), minValue)
  return clampedValue


That's all. Thank you!!!


Regards,

Mark Jayvhie Belbar


Sure thing!


1 person likes this

Daniel,


Thank you very much!!!



Cheers,

Jayvhie

Hi Mark,


That's just a simple clamping function which will clamp the provided "value" to the interval [minValue, maxValue] and return the result.


Daniel


1 person likes this
Login to post a comment