Package org.hibernate.internal.util
Class MathHelper
java.lang.Object
org.hibernate.internal.util.MathHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
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.
-