FileDocCategorySizeDatePackage
FloatMath.javaAPI DocAndroid 5.1 API3255Thu Mar 12 22:22:10 GMT 2015android.util

FloatMath

public class FloatMath extends Object
Math routines similar to those found in {@link java.lang.Math}. On versions of Android with a JIT, these are significantly slower than the equivalent {@code Math} functions, which should be used in preference to these.
deprecated
Use {@link java.lang.Math} instead.

Fields Summary
Constructors Summary
private FloatMath()
Prevents instantiation.

Methods Summary
public static native floatceil(float value)
Returns the float conversion of the most negative (i.e. closest to negative infinity) integer value which is greater than the argument.

param
value to be converted
return
the ceiling of value

public static native floatcos(float angle)
Returns the closest float approximation of the cosine of the argument.

param
angle to compute the cosine of, in radians
return
the cosine of angle

public static native floatexp(float value)
Returns the closest float approximation of the raising "e" to the power of the argument.

param
value to compute the exponential of
return
the exponential of value

public static native floatfloor(float value)
Returns the float conversion of the most positive (i.e. closest to positive infinity) integer value which is less than the argument.

param
value to be converted
return
the floor of value

public static native floathypot(float x, float y)
Returns {@code sqrt(}{@code x}{@code 2}{@code +} {@code y}{@code 2}{@code )}.

param
x a float number
param
y a float number
return
the hypotenuse

public static native floatpow(float x, float y)
Returns the closest float approximation of the result of raising {@code x} to the power of {@code y}.

param
x the base of the operation.
param
y the exponent of the operation.
return
{@code x} to the power of {@code y}.

public static native floatsin(float angle)
Returns the closest float approximation of the sine of the argument.

param
angle to compute the cosine of, in radians
return
the sine of angle

public static native floatsqrt(float value)
Returns the closest float approximation of the square root of the argument.

param
value to compute sqrt of
return
the square root of value