FileDocCategorySizeDatePackage
FloatMath_Delegate.javaAPI DocAndroid 5.1 API4047Thu Mar 12 22:22:44 GMT 2015android.util

FloatMath_Delegate

public final class FloatMath_Delegate extends Object
Delegate implementing the native methods of android.util.FloatMath Through the layoutlib_create tool, the original native methods of FloatMath have been replaced by calls to methods of the same name in this delegate class. Because it's a stateless class to start with, there's no need to keep a {@link DelegateManager} around to map int to instance of the delegate.

Fields Summary
Constructors Summary
private FloatMath_Delegate()
Prevents instantiation.

Methods Summary
static 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

        return (float)Math.ceil(value);
    
static 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

        return (float)Math.cos(angle);
    
static 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

        return (float)Math.exp(value);
    
static 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

        return (float)Math.floor(value);
    
static 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

        return (float)Math.sqrt(x*x + y*y);
    
static 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}.

        return (float)Math.pow(x, y);
    
static 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

        return (float)Math.sin(angle);
    
static 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

        return (float)Math.sqrt(value);