Here you can find the source of atan2Scalar(double val, double[] arr)
public static double[] atan2Scalar(double val, double[] arr)
//package com.java2s; //License from project: BSD License public class Main { public static double[] atan2Scalar(double val, double[] arr) { double[] result = new double[arr.length]; for (int i = 0; i < arr.length; i++) { result[i] = Math.atan2(val, arr[i]); }/* ww w. j a v a2s. c o m*/ return result; } 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]); } return result; } }