error: call of overloaded 'abs(float&)' is ambiguous

I’ve been building an iPhone app prototype on a windows machine and recently tried porting it over to Xcode to actually start testing it in the simulator. I have a little easing routine that uses a call to abs() to get the absolute value of the distance an object from it’s target location. The code does this:

float dy = textbox_targetY - textboxY;  
if(abs(dy) > 1){  
     textboxY += dy * 0.05;  

This worked fine in MSVC but is now giving me the following error in Xcode:
error: call of overloaded ‘abs(float&)’ is ambiguous

I’m assuming there’s a relatively easy fix for this, probably casting or defining something more specifically, but I’m not really sure how to go about it. Anyone know what’s happening here?

yes you just need to use fabs instead of abs, it’s the same but for floats instead of ints

Ahh. Good to know. Thanks.