Java atan atan(float tan_value)

Here you can find the source of atan(float tan_value)

Description

atan

License

Open Source License

Declaration

public static float atan(float tan_value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private final static int accuracy_level = 65536;
    private static float[] atan_table = new float[accuracy_level];

    public static float atan(float tan_value) {
        if (tan_value < -32f) {
            return -1.54f;
        } else if (tan_value > 32f) {
            return 1.54f;
        } else {//ww  w. jav a2  s .  c o m
            return atan_table[(int) ((tan_value + 32f) * accuracy_level / 64f)];
        }
    }
}

Related

  1. atan(double a)
  2. atan(double a)
  3. atan(double arg)
  4. atan(double x)
  5. atan(float value)
  6. atan(float x)
  7. atan(int f)
  8. atan(Integer a)