I've used fabs before which makes passed values positive, but I need a function which will make number negative ??
have you tried fabs()*-1
Maybe try fabs()*-1?
a = (a > 0) ? -a : a;