Math
instead.@Deprecated public class FloatMath extends Object
Math
.
Historically these methods were faster than the equivalent double-based
Math
methods. On versions of Android with a JIT they
became slower and have since been re-implemented to wrap calls to
Math
. Math
should be used in
preference.
All methods were removed from the public API in version 23.
Modifier and Type | Method and Description |
---|---|
static float |
ceil(float value)
Deprecated.
Returns the float conversion of the most negative (i.e. closest to
negative infinity) integer value which is greater than the argument.
|
static float |
cos(float angle)
Deprecated.
Returns the closest float approximation of the cosine of the argument.
|
static float |
exp(float value)
Deprecated.
Returns the closest float approximation of the raising "e" to the power
of the argument.
|
static float |
floor(float value)
Deprecated.
Returns the float conversion of the most positive (i.e. closest to
positive infinity) integer value which is less than the argument.
|
static float |
hypot(float x,
float y)
Deprecated.
Returns
sqrt( x 2 +
y 2 ) . |
static float |
pow(float x,
float y)
Deprecated.
Returns the closest float approximation of the result of raising
x to the power of y . |
static float |
sin(float angle)
Deprecated.
Returns the closest float approximation of the sine of the argument.
|
static float |
sqrt(float value)
Deprecated.
Returns the closest float approximation of the square root of the
argument.
|
public static float floor(float value)
value
- to be convertedpublic static float ceil(float value)
value
- to be convertedpublic static float sin(float angle)
angle
- to compute the cosine of, in radianspublic static float cos(float angle)
angle
- to compute the cosine of, in radianspublic static float sqrt(float value)
value
- to compute sqrt ofpublic static float exp(float value)
value
- to compute the exponential ofpublic static float pow(float x, float y)
x
to the power of y
.x
- the base of the operation.y
- the exponent of the operation.x
to the power of y
.public static float hypot(float x, float y)
sqrt(
x
2
+
y
2
)
.x
- a float numbery
- a float number