Java com.google.common.math IntMath fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.math IntMath fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.math IntMath.

The text is from its open source code.

Method

intbinomial(int n, int k)
Returns n choose k , also known as the binomial coefficient of n and k , or Integer#MAX_VALUE if the result does not fit in an int .
intcheckedAdd(int a, int b)
Returns the sum of a and b , provided it does not overflow.
intcheckedMultiply(int a, int b)
Returns the product of a and b , provided it does not overflow.
intcheckedPow(int b, int k)
Returns the b to the k th power, provided it does not overflow.
intcheckedSubtract(int a, int b)
Returns the difference of a and b , provided it does not overflow.
intdivide(int p, int q, RoundingMode mode)
Returns the result of dividing p by q , rounding using the specified RoundingMode .
intgcd(int a, int b)
Returns the greatest common divisor of a, b .
booleanisPowerOfTwo(int x)
Returns true if x represents a power of two.
intlog10(int x, RoundingMode mode)
Returns the base-10 logarithm of x , rounded according to the specified rounding mode.
intlog2(int x, RoundingMode mode)
Returns the base-2 logarithm of x , rounded according to the specified rounding mode.
intmean(int x, int y)
Returns the arithmetic mean of x and y , rounded towards negative infinity.
intmod(int x, int m)
Returns x mod m , a non-negative value less than m .
intpow(int b, int k)
Returns b to the k th power.