clamp VEX function

Returns value clamped between min and max.

Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex

  1. int clamp(int value, int min, int max)

  2. float clamp(float value, float min, float max)

  3. vector clamp(vector value, vector min, vector max)

  4. vector4 clamp(vector4 value, vector4 min, vector4 max)

Returns value clamped between min and max. For vectors Each component is clamped.