Here you can find the source of matrixDestructAdd(double[][] m1, double[][] m2)
public static void matrixDestructAdd(double[][] m1, double[][] m2)
//package com.java2s; //License from project: Open Source License public class Main { public static void matrixDestructAdd(double[][] m1, double[][] m2) { assert (m1.length == m2.length); assert (m1[0].length == m2[0].length); for (int i = 0; i < m1.length; i++) for (int j = 0; j < m1[0].length; j++) m1[i][j] = m1[i][j] + m2[i][j]; }/* ww w .j av a 2 s . c om*/ }