Hoe should I re-write this so I don't get a warning?
I have been updating my Android apps from Android 2.1 to 2.2 and now I
keep getting this error: "Use java.lang.Math#sqrt instead of
android.util.FloatMath#sqrt() since it is faster as of API 8"
here are the few lines of code:
private float spacing(MotionEvent event) {
float x = event.getX(0) - event.getX(1);
float y = event.getY(0) - event.getY(1);
return FloatMath.sqrt(x * x + y * y);
}
No comments:
Post a Comment