Here you can find the source of arctan(float opp, float adj)
public static float arctan(float opp, float adj)
//package com.java2s; public class Main { /**//from w w w . j a v a2 s .co m * Convert Radians to Degrees. */ public static final float TO_DEGREES = 57.2957795f; /** * Get the desired angle of ARCTAN from the given opp and adj */ public static float arctan(float opp, float adj) { if (adj < 0.0) return -(float) (Math.atan(opp / adj) * TO_DEGREES); else return -(float) (Math.atan(opp / adj) * TO_DEGREES) + 180; } /** * */ public static float arctan(float value) { return -(float) (Math.atan(value) * TO_DEGREES) + 180; } }