Sorry. My maths is really poor these days.
I need to convert a negative number into it's positive version for use as a speed control on an analog joystick.
I am currently using this:
Is there an easier way of making a negative number positive. My method works but something tells me you can do it in one equation and not two as I am. I know this might sound like nitpicking but silly things like this annoy me at times.
Max
I need to convert a negative number into it's positive version for use as a speed control on an analog joystick.
I am currently using this:
percent1#=JoyZ() percent2#=1+percent1# percent1#=1-percent2# max_speed=top_speed*percent1
Is there an easier way of making a negative number positive. My method works but something tells me you can do it in one equation and not two as I am. I know this might sound like nitpicking but silly things like this annoy me at times.
Max