public class AlternativeMaths extends Object
| Constructor and Description |
|---|
AlternativeMaths() |
| Modifier and Type | Method and Description |
|---|---|
static int |
max2(int a,
int b)
Branchless max for ints
|
static int |
min2(int a,
int b)
Branchless min for ints
|
static int |
sign2(int a)
Mike's fast integer sign algorithm
|
static int |
sign2fast(int a)
Fast branchless integer sign
Not correct for MIN_INTEGER - but valid for all other int values
|
static double |
tanh(double x) |
public static int min2(int a,
int b)
public static int max2(int a,
int b)
public static int sign2fast(int a)
public static double tanh(double x)
public static final int sign2(int a)
a - Copyright © 2013. All Rights Reserved.