There is an issue in the implementation of math.clamp, which means the value to be clamped is returned rather than the result of the check against the lower bound in all cases where b > max(a, value)
This commit fixes that behaviour, ensuring that the correct value is returned in the case of b > max(a, value)
Additionally, this commit defines the expected behaviour when a > b.
There is an issue in the implementation of math.clamp, which means the value to be clamped is returned rather than the result of the check against the lower bound in all cases where b > max(a, value)
This commit fixes that behaviour, ensuring that the correct value is returned in the case of b > max(a, value)
Additionally, this commit defines the expected behaviour when a > b.
Tests included.