NXC Saturation algorithm for limiting motors? What is a good algorithm in NXC for control saturation? I want to make sure my motors don't turn past a certain angle, or they will break the model. 
I could do something like:

if (angle &gt; 45) {angle = 45;)


But that would be a hard limit. I'm looking for a smoother limit.
By "smoother limit", if you mean "when it gets closer to the limit, it will softly land there by slowing down" then:
I recommend using PID control where the response (how fast the motor is moving to the limit) is controlled proportional to the error (how far away from the limit you are).

Wikipedia has a good intro to PID control: http://en.wikipedia.org/wiki/PID_controller