public final class Util extends Object
| Modifier and Type | Field and Description |
|---|---|
static float |
SQRT2 |
| Modifier and Type | Method and Description |
|---|---|
static float |
div(float a,
float b)
An equivalent to div for float
|
static int |
ldu(int v)
(Hopefully) fast floor log2 of an unsigned(!) integer value.
|
static void |
max(double[] a,
double[] b)
Writes max(a,b) into a
|
static void |
max(float[] a,
float[] b)
Writes max(a,b) into a
|
static void |
memset(boolean[] array,
boolean value)
For Java, the fastest way doing memset(x)
Found at
http://burks.brighton.ac.uk/burks/language/java/jprogfaq/faq_b.htm
|
static void |
memset(byte[] array,
byte value)
For Java, the fastest way doing memset(x)
Found at
http://burks.brighton.ac.uk/burks/language/java/jprogfaq/faq_b.htm
|
static void |
memset(char[] array,
char value)
For Java, the fastest way doing memset(x)
Found at
http://burks.brighton.ac.uk/burks/language/java/jprogfaq/faq_b.htm
|
static void |
memset(double[] array,
double value)
For Java, the fastest way doing memset(x)
Found at
http://burks.brighton.ac.uk/burks/language/java/jprogfaq/faq_b.htm
|
static void |
memset(float[] array,
float value)
For Java, the fastest way doing memset(x)
Found at
http://burks.brighton.ac.uk/burks/language/java/jprogfaq/faq_b.htm
|
static void |
memset(int[] array,
int value)
For Java, the fastest way doing memset(x)
Found at
http://burks.brighton.ac.uk/burks/language/java/jprogfaq/faq_b.htm
|
static void |
memset(long[] array,
long value)
For Java, the fastest way doing memset(x)
Found at
http://burks.brighton.ac.uk/burks/language/java/jprogfaq/faq_b.htm
|
static void |
memset(short[] array,
short value)
For Java, the fastest way doing memset(x)
Found at
http://burks.brighton.ac.uk/burks/language/java/jprogfaq/faq_b.htm
|
static void |
min(double[] a,
double[] b)
Writes min(a,b) into a
|
static void |
min(float[] a,
float[] b)
Writes min(a,b) into a
|
static float |
mod(float a,
float mod)
An equivalent to % for float
|
static int |
pingPong(int a,
int mod)
Return an unsigned integer that bounces in a ping pong manner in the range
{@code [0 ...
|
static double |
pow(double a,
int b)
Double/Integer version of
Math.pow(double, double). |
static float |
pow(float a,
int b)
Float/Integer version of
Math.pow(double, double). |
static long |
pow(int a,
int b)
Integer version of
Math.pow(double, double). |
static int |
round(double a)
Round a
|
static int |
round(float a)
Round a
|
static int |
roundPos(double a)
Round a positive a
|
static int |
roundPos(float a)
Round a positive a
|
public static final int ldu(int v)
v - unsigned integerpublic static final int pingPong(int a,
int mod)
[0 ... mod - 1].a - the value to be flippedmod - the size of the rangepublic static final long pow(int a,
int b)
Math.pow(double, double).a - b - public static final float pow(float a,
int b)
Math.pow(double, double).a - b - public static final double pow(double a,
int b)
Math.pow(double, double).a - b - public static final void min(float[] a,
float[] b)
a - b - public static final void max(float[] a,
float[] b)
a - b - public static final void min(double[] a,
double[] b)
a - b - public static final void max(double[] a,
double[] b)
a - b - public static final int round(float a)
a - public static final int round(double a)
a - public static final int roundPos(float a)
a - public static final int roundPos(double a)
a - public static final float div(float a,
float b)
a - b - public static final float mod(float a,
float mod)
a - mod - 0 <= b < modpublic static final void memset(byte[] array,
byte value)
array - value - public static final void memset(short[] array,
short value)
array - value - public static final void memset(int[] array,
int value)
array - value - public static final void memset(long[] array,
long value)
array - value - public static final void memset(float[] array,
float value)
array - value - public static final void memset(double[] array,
double value)
array - value - public static final void memset(boolean[] array,
boolean value)
array - value - public static final void memset(char[] array,
char value)
array - value - Copyright © 2015–2021 Fiji. All rights reserved.