Ok maybe somebody here can help me. I need to find a way to limit the following equation to the values of -1 <= x <= 1. ( ( targalt - alt:radar ) / targalt ) It's for an altitude control program and this is part of the code that sets the pitch thus why i need the limits. Also targalt is something the user would set when they start the program.