Here you can find the source of divideElements(double[] v1, double[] v2, double[] rs)
public static double[] divideElements(double[] v1, double[] v2, double[] rs)
//package com.java2s; //License from project: Apache License public class Main { public static double[] divideElements(double[] v1, double[] v2, double[] rs) { for (int i = 0; i < rs.length; i++) { if (v2[i] != 0) { rs[i] = v1[i] / v2[i];//from w ww. ja va 2 s.c om } } return rs; } }