Hi Alexa.kl,
yes - abs() is good, it works with both integers and floating point numbers.
There is also fabs() which only works with floats - fabs() is slightly faster because of this.
Hi Alexa.kl,
yes - abs() is good, it works with both integers and floating point numbers.
There is also fabs() which only works with floats - fabs() is slightly faster because of this.