I am having the negative floating point number as:
a = -0.340515;
to convert this into positive number I used the abs() method as:
You have to use: abs() for int fabs() for double fabsf() for float Above function will also work but you can also try something like this.
if(a<0) { a=-a; }