org.apache.myfaces.tobago.internal.layout
Class MathUtils
java.lang.Object
org.apache.myfaces.tobago.internal.layout.MathUtils
public class MathUtils
- extends Object
Field Summary |
static double |
EPSILON
Values smaller than this EPSILON should be treated as zero. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EPSILON
public static final double EPSILON
- Values smaller than this EPSILON should be treated as zero.
- See Also:
- Constant Field Values
MathUtils
public MathUtils()
adjustRemainders
public static void adjustRemainders(double[] list,
double bias)
- Adjusts the list of double values to rounded values with the same sum.
E. g. 2.3, 2.4, 2.5, 2.8 -> 2.0, 2.0, 3.0, 3.0
- Parameters:
list
-
findAndAdjustMaxRemainder
public static double findAndAdjustMaxRemainder(double[] list)
findAndAdjustMinRemainder
public static double findAndAdjustMinRemainder(double[] list)
remainder
public static double remainder(double v)
isZero
public static boolean isZero(double factor)
isNotZero
public static boolean isNotZero(double factor)
isInteger
public static boolean isInteger(double value)
isNotInteger
public static boolean isNotInteger(double value)
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.