Here you can find the source of atan2(double[] arr1, double[] arr2)
public static double[] atan2(double[] arr1, double[] arr2)
//package com.java2s; //License from project: BSD License public class Main { public static double[] atan2(double[] arr1, double[] arr2) { double[] result = new double[arr1.length]; for (int i = 0; i < arr1.length; i++) { result[i] = Math.atan2(arr2[i], arr1[i]); }//from ww w . j ava 2 s . c o m return result; } }