Is there something like, unclamp(), to remove clamp()? Or how can set it to toggle properly, with minimal code?
Clamp - Is there a quick way to reset it?
Do you mean the math related clamp()?
If so, no there is no way to unclamp something
clamp() forces an upper or lower limit by replacing a value by the boundary value if it goes outside the allowed range.
If you store the clamped value in the same place as the original unclamped value, you are destroying the original value if it was out of bounds, as @shaarigan says, you cannot undo that destruction.
If you want to know the original unclamped value afterwards, store the clamped value at a different spot than the unclamped value. However, it likely needs some careful thought what the relation between both values is exactly. It seems to me at first sight that as time goes on, the unclamped value may become mostly meaningless.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement