Java Matrix Transpose transpose3x3Matrix(float[][] m)

Here you can find the source of transpose3x3Matrix(float[][] m)

Description

Utility function that returns the transpose of the given 3X3 matrix.

License

Open Source License

Declaration

public static final float[][] transpose3x3Matrix(float[][] m) 

Method Source Code

//package com.java2s;
/**/*from   w  w  w  .  ja v a 2 s. c o  m*/
 *                     ProScene (version 1.1.0)      
 *    Copyright (c) 2010-2011 by National University of Colombia
 *                 @author Jean Pierre Charalambos      
 *           http://www.disi.unal.edu.co/grupos/remixlab/
 *                           
 * This java package provides classes to ease the creation of interactive 3D
 * scenes in Processing.
 * 
 * This source file is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option)
 * any later version.
 * 
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * 
 * A copy of the GNU General Public License is available on the World Wide Web
 * at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by
 * writing to the Free Software Foundation, 51 Franklin Street, Suite 500
 * Boston, MA 02110-1335, USA.
 */

public class Main {
    /**
     * Utility function that returns the transpose of the given 3X3 matrix.
     */
    public static final float[][] transpose3x3Matrix(float[][] m) {
        float[][] matrix = new float[4][4];
        for (int i = 0; i < 3; ++i)
            for (int j = 0; j < 3; ++j)
                matrix[i][j] = m[j][i];
        return matrix;
    }
}

Related

  1. transpose(long[] a, double offset)
  2. transpose(Object[][] matrix)
  3. transpose(Object[][] matrix)
  4. transpose2d(Object[][] array)
  5. transpose2DArray(Double[][] data)
  6. transpose4x4(float m[], float t[])
  7. transpose_image(Object source, int width, int height)
  8. transposeBooleanMatrix(boolean[][] matrix)
  9. transposeInPlace(float[] src)