Here you can find the source of subtractArray(float[] arr1, float[] arr2)
public static float[] subtractArray(float[] arr1, float[] arr2)
//package com.java2s; //License from project: Open Source License public class Main { public static float[] subtractArray(float[] arr1, float[] arr2) { int l = arr1.length; float[] res = new float[l]; for (int i = 0; i < l; i++) { res[i] = arr1[i] - arr2[i];//from w ww . j av a 2s .c o m } return res; } }