Package org.hibernate.internal.util
Class MathHelper
- java.lang.Object
-
- org.hibernate.internal.util.MathHelper
-
public final class MathHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intceilingPowerOfTwo(int value)Returns the smallest power of two number that is greater than or equal tovalue.static intdivideRoundingUp(int numerator, int denominator)Returns the result of dividing a positivenumeratorby a positivedenominatorrounded up.
-
-
-
Method Detail
-
ceilingPowerOfTwo
public static int ceilingPowerOfTwo(int value)
Returns the smallest power of two number that is greater than or equal tovalue.- Parameters:
value- reference number- Returns:
- smallest power of two number
-
divideRoundingUp
public static int divideRoundingUp(int numerator, int denominator)Returns the result of dividing a positivenumeratorby a positivedenominatorrounded up.For example dividing 5 by 2 ist 2.5, which (when rounded up) gives a result of 3.
-
-