Java Utililty Methods atan2

List of utility methods to do atan2

Description

The list of methods to do atan2 are organized into topic(s).

Method

double[]atan2Scalar(double val, double[] arr)
atan Scalar
double[] result = new double[arr.length];
for (int i = 0; i < arr.length; i++) {
    result[i] = Math.atan2(val, arr[i]);
return result;
floatsquareAtan2(float y, float x)
Calculates the square angle corresponding with the given direction.
float squareLength = Math.max(Math.abs(x), Math.abs(y));
y /= squareLength;
x /= squareLength;
int signs = (x < 0.0f ? 1 : 0) | (y < 0.0f ? 2 : 0);
switch (signs) {
case 0:
    return -x + y + 1.0f; 
case 1:
...