Build 1.0_r1(from source)

android.util
Class FloatMath

java.lang.Object
  extended by android.util.FloatMath

public class FloatMath
extends Object

Math routines similar to those found in Math. Performs computations on float values directly without incurring the overhead of conversions to and from double.

On one platform, FloatMath.sqrt(100) executes in one third of the time required by java.lang.Math.sqrt(100).


Method Summary
static float ceil(float value)
          Returns the float conversion of the most negative (i.e.
static float cos(float angle)
          Returns the closest float approximation of the cosine of the argument.
static float floor(float value)
          Returns the float conversion of the most positive (i.e.
static float sin(float angle)
          Returns the closest float approximation of the sine of the argument.
static float sqrt(float value)
          Returns the closest float approximation of the square root of the argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

floor

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

Parameters:
value - to be converted
Returns:
the floor of value

ceil

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

Parameters:
value - to be converted
Returns:
the ceiling of value

sin

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

Parameters:
angle - to compute the cosine of, in radians
Returns:
the sine of angle

cos

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

Parameters:
angle - to compute the cosine of, in radians
Returns:
the cosine of angle

sqrt

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

Parameters:
value - to compute sqrt of
Returns:
the square root of value

Build 1.0_r1(from source)

Please submit a feedback, bug or feature