Clamp method is wrong

- the order of the parameters "max" and "min" is inverted (based on how they are used)
- the method is wrong. it doesn't set the right bounds

ps: sorry its very stupid, but I wanted to fix it!