FileDocCategorySizeDatePackage
FloatMathTest.javaAPI DocAndroid 1.5 API1670Wed May 06 22:42:02 BST 2009android.util

FloatMathTest

public class FloatMathTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestCeil()

        assertEquals(79, FloatMath.ceil(78.89f), 0);
        assertEquals(-78, FloatMath.ceil(-78.89f), 0);
    
public voidtestCos()

        assertEquals(1.0f, FloatMath.cos(0), 0);
        assertEquals(0.5403023058681398f, FloatMath.cos(1), 0);
    
public voidtestFloor()

        assertEquals(78, FloatMath.floor(78.89f), 0);
        assertEquals(-79, FloatMath.floor(-78.89f), 0);
    
public voidtestSin()

        assertEquals(0.0, FloatMath.sin(0), 0);
        assertEquals(0.8414709848078965f, FloatMath.sin(1), 0);
    
public voidtestSqrt()

        assertEquals(7, FloatMath.sqrt(49), 0);
        assertEquals(10, FloatMath.sqrt(100), 0);
        assertEquals(0, FloatMath.sqrt(0), 0);
        assertEquals(1, FloatMath.sqrt(1), 0);