public class MathUtil extends Object
Constructor and Description |
---|
MathUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
align(int v,
int a)
Aligns the argument to the given alignment.
|
static long |
align(long v,
int a)
Aligns the argument to the given alignment.
|
static long |
gcd(long a,
long b) |
static int |
log2p(int x) |
static int |
minDiff(int... offs) |
static int |
pow2(int power) |
public static int log2p(int x)
public static int minDiff(int... offs)
public static long gcd(long a, long b)
public static int pow2(int power)
public static int align(int v, int a)
v
- value to aligna
- alignment, should be power of twopublic static long align(long v, int a)
v
- value to aligna
- alignment, should be power of twoCopyright © 2021. All rights reserved.