FileDocCategorySizeDatePackage
FastMath.javaAPI DocAndroid 1.5 API1080Wed May 06 22:41:56 BST 2009com.android.internal.util

FastMath

public class FastMath extends Object
Fast and loose math routines.

Fields Summary
Constructors Summary
Methods Summary
public static intround(float x)
Fast round from float to int. This is faster than Math.round() thought it may return slightly different results. It does not try to handle (in any meaningful way) NaN or infinities.

        long lx = (long)(x * (65536 * 256f));
        return (int)((lx + 0x800000) >> 24);