未找到方法 FloatMath.sqrt()
Method FloatMath.sqrt() not found
我正在使用新的 Android Marshmallow SDK,但方法 FloatMath.sqrt()
已消失。我现在应该用什么?
文档是这样说的:
Historically these methods were faster than the equivalent double-based
java.lang.Math methods. On versions of Android with a JIT they
became slower and have since been re-implemented to wrap calls to
java.lang.Math. java.lang.Math should be used in preference.
All methods were removed from the public API in version 23.
@deprecated Use java.lang.Math instead.
这意味着解决方案是使用数学 class:
(float)Math.sqrt(...)
我正在使用新的 Android Marshmallow SDK,但方法 FloatMath.sqrt()
已消失。我现在应该用什么?
文档是这样说的:
Historically these methods were faster than the equivalent double-based java.lang.Math methods. On versions of Android with a JIT they became slower and have since been re-implemented to wrap calls to java.lang.Math. java.lang.Math should be used in preference.
All methods were removed from the public API in version 23.
@deprecated Use java.lang.Math instead.
这意味着解决方案是使用数学 class:
(float)Math.sqrt(...)