# Matrix3

#### new Cesium.Matrix3(column0Row0, column1Row0, column2Row0, column0Row1, column1Row1, column2Row1, column0Row2, column1Row2, column2Row2)
Core/Matrix3.js 33

A 3x3 matrix, indexable as a column-major order array. Constructor parameters are in row-major order for code readability.

Name | Type | Default | Description
--- | --- | --- | ---
`column0Row0` | Number | `0.0` | optional The value for column 0, row 0.
`column1Row0` | Number | `0.0` | optional The value for column 1, row 0.
`column2Row0` | Number | `0.0` | optional The value for column 2, row 0.
`column0Row1` | Number | `0.0` | optional The value for column 0, row 1.
`column1Row1` | Number | `0.0` | optional The value for column 1, row 1.
`column2Row1` | Number | `0.0` | optional The value for column 2, row 1.
`column0Row2` | Number | `0.0` | optional The value for column 0, row 2.
`column1Row2` | Number | `0.0` | optional The value for column 1, row 2.
`column2Row2` | Number | `0.0` | optional The value for column 2, row 2.

##### See:

- Matrix3.fromColumnMajorArray
- Matrix3.fromRowMajorArray
- Matrix3.fromQuaternion
- Matrix3.fromScale
- Matrix3.fromUniformScale
- Matrix2
- Matrix4

### Members

#### length : Number
Core/Matrix3.js 1426

Gets the number of items in the collection.

#### static constant Cesium.Matrix3.COLUMN0ROW0 : Number
Core/Matrix3.js 1353

The index into Matrix3 for column 0, row 0.

#### static constant Cesium.Matrix3.COLUMN0ROW1 : Number
Core/Matrix3.js 1361

The index into Matrix3 for column 0, row 1.

#### static constant Cesium.Matrix3.COLUMN0ROW2 : Number
Core/Matrix3.js 1369

The index into Matrix3 for column 0, row 2.

#### static constant Cesium.Matrix3.COLUMN1ROW0 : Number
Core/Matrix3.js 1377

The index into Matrix3 for column 1, row 0.

#### static constant Cesium.Matrix3.COLUMN1ROW1 : Number
Core/Matrix3.js 1385

The index into Matrix3 for column 1, row 1.

#### static constant Cesium.Matrix3.COLUMN1ROW2 : Number
Core/Matrix3.js 1393

The index into Matrix3 for column 1, row 2.

#### static constant Cesium.Matrix3.COLUMN2ROW0 : Number
Core/Matrix3.js 1401

The index into Matrix3 for column 2, row 0.

#### static constant Cesium.Matrix3.COLUMN2ROW1 : Number
Core/Matrix3.js 1409

The index into Matrix3 for column 2, row 1.

#### static constant Cesium.Matrix3.COLUMN2ROW2 : Number
Core/Matrix3.js 1417

The index into Matrix3 for column 2, row 2.

#### static constant Cesium.Matrix3.IDENTITY : Matrix3
Core/Matrix3.js 1337

An immutable Matrix3 instance initialized to the identity matrix.

#### static Cesium.Matrix3.packedLength : Number
Core/Matrix3.js 49

The number of elements used to pack the object into an array.

#### static constant Cesium.Matrix3.ZERO : Matrix3
Core/Matrix3.js 1345

An immutable Matrix3 instance initialized to the zero matrix.

### Methods

#### clone(result) → Matrix3
Core/Matrix3.js 1439

Duplicates the provided Matrix3 instance.

Name | Type | Description
--- | --- | ---
`result` | Matrix3 | optional The object onto which to store the result.

##### Returns:

The modified result parameter or a new Matrix3 instance if one was not provided.

#### equals(right) → Boolean
Core/Matrix3.js 1450

Compares this matrix to the provided matrix componentwise and returns `true` if they are equal, `false` otherwise.

Name | Type | Description
--- | --- | ---
`right` | Matrix3 | optional The right hand side matrix.

##### Returns:

`true` if they are equal, `false` otherwise.

#### equalsEpsilon(right, epsilon) → Boolean
Core/Matrix3.js 1480

Compares this matrix to the provided matrix componentwise and returns `true` if they are within the provided epsilon, `false` otherwise.

Name | Type | Default | Description
--- | --- | --- | ---
`right` | Matrix3 |  | optional The right hand side matrix.
`epsilon` | Number | `0` | optional The epsilon to use for equality testing.

##### Returns:

`true` if they are within the provided epsilon, `false` otherwise.

#### toString() → String
Core/Matrix3.js 1490

Creates a string representing this Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.

##### Returns:

A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.

#### static Cesium.Matrix3.abs(matrix, result) → Matrix3
Core/Matrix3.js 1169

Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix with signed elements.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.add(left, right, result) → Matrix3
Core/Matrix3.js 790

Computes the sum of two matrices.

Name | Type | Description
--- | --- | ---
`left` | Matrix3 | The first matrix.
`right` | Matrix3 | The second matrix.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.clone(matrix, result) → Matrix3
Core/Matrix3.js 119

Duplicates a Matrix3 instance.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to duplicate.
`result` | Matrix3 | optional The object onto which to store the result.

##### Returns:

The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)

#### static Cesium.Matrix3.computeEigenDecomposition(matrix, result) → Object
Core/Matrix3.js 1123

Computes the eigenvectors and eigenvalues of a symmetric matrix.

Returns a diagonal matrix and unitary matrix such that: `matrix = unitary matrix * diagonal matrix * transpose(unitary matrix)`

The values along the diagonal of the diagonal matrix are the eigenvalues. The columns of the unitary matrix are the corresponding eigenvectors.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to decompose into diagonal and unitary matrix. Expected to be symmetric.
`result` | Object | optional An object with unitary and diagonal properties which are matrices onto which to store the result.

##### Returns:

An object with unitary and diagonal properties which are the unitary and diagonal matrices, respectively.

##### Example:

    var a = //... symetric matrix
    var result = {
        unitary : new Cesium.Matrix3(),
        diagonal : new Cesium.Matrix3()
    };
    Cesium.Matrix3.computeEigenDecomposition(a, result);

    var unitaryTranspose = Cesium.Matrix3.transpose(result.unitary, new Cesium.Matrix3());
    var b = Cesium.Matrix3.multiply(result.unitary, result.diagonal, new Cesium.Matrix3());
    Cesium.Matrix3.multiply(b, unitaryTranspose, b); // b is now equal to a

    var lambda = Cesium.Matrix3.getColumn(result.diagonal, 0, new Cesium.Cartesian3()).x;  // first eigenvalue
    var v = Cesium.Matrix3.getColumn(result.unitary, 0, new Cesium.Cartesian3());          // first eigenvector
    var c = Cesium.Cartesian3.multiplyByScalar(v, lambda, new Cesium.Cartesian3());        // equal to Cesium.Matrix3.multiplyByVector(a, v)

#### static Cesium.Matrix3.determinant(matrix) → Number
Core/Matrix3.js 1194

Computes the determinant of the provided matrix.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to use.

##### Returns:

The value of the determinant of the matrix.

#### static Cesium.Matrix3.equals(left, right) → Boolean
Core/Matrix3.js 1285

Compares the provided matrices componentwise and returns `true` if they are equal, `false` otherwise.

Name | Type | Description
--- | --- | ---
`left` | Matrix3 | optional The first matrix.
`right` | Matrix3 | optional The second matrix.

##### Returns:

`true` if left and right are equal, `false` otherwise.

#### static Cesium.Matrix3.equalsEpsilon(left, right, epsilon) → Boolean
Core/Matrix3.js 1312

Compares the provided matrices componentwise and returns `true` if they are within the provided epsilon, `false` otherwise.

Name | Type | Default | Description
--- | --- | --- | ---
`left` | Matrix3 |  | optional The first matrix.
`right` | Matrix3 |  | optional The second matrix.
`epsilon` | Number | `0` | optional The epsilon to use for equality testing.

##### Returns:

`true` if left and right are within the provided epsilon, `false` otherwise.

#### static Cesium.Matrix3.fromArray(array, startingIndex, result) → Matrix3
Core/Matrix3.js 159

Creates a Matrix3 from 9 consecutive elements in an array.

Name | Type | Default | Description
--- | --- | --- | ---
`array` | Array.<Number> |  | The array whose 9 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
`startingIndex` | Number | `0` | optional The offset into the array of the first element, which corresponds to first column first row position in the matrix.
`result` | Matrix3 |  | optional The object onto which to store the result.

##### Returns:

The modified result parameter or a new Matrix3 instance if one was not provided.

##### Example:

    // Create the Matrix3:
    // [1.0, 2.0, 3.0]
    // [1.0, 2.0, 3.0]
    // [1.0, 2.0, 3.0]

    var v = [1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];
    var m = Cesium.Matrix3.fromArray(v);

    // Create same Matrix3 with using an offset into an array
    var v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];
    var m2 = Cesium.Matrix3.fromArray(v2, 2);

#### static Cesium.Matrix3.fromColumnMajorArray(values, result) → Matrix3
Core/Matrix3.js 189

Creates a Matrix3 instance from a column-major order array.

Name | Type | Description
--- | --- | ---
`values` | Array.<Number> | The column-major order array.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The modified result parameter, or a new Matrix3 instance if one was not provided.

#### static Cesium.Matrix3.fromCrossProduct(vector, result) → Matrix3
Core/Matrix3.js 406

Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.

Name | Type | Description
--- | --- | ---
`vector` | Cartesian3 | the vector on the left hand side of the cross product operation.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The modified result parameter, or a new Matrix3 instance if one was not provided.

##### Example:

    // Creates
    //   [0.0, -9.0,  8.0]
    //   [9.0,  0.0, -7.0]
    //   [-8.0, 7.0,  0.0]
    var m = Cesium.Matrix3.fromCrossProduct(new Cesium.Cartesian3(7.0, 8.0, 9.0));

#### static Cesium.Matrix3.fromHeadingPitchRoll(headingPitchRoll, result) → Matrix3
Core/Matrix3.js 283

Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )

Name | Type | Description
--- | --- | ---
`headingPitchRoll` | HeadingPitchRoll | the headingPitchRoll to use.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The 3x3 rotation matrix from this headingPitchRoll.

#### static Cesium.Matrix3.fromQuaternion(quaternion, result) → Matrix3
Core/Matrix3.js 233

Computes a 3x3 rotation matrix from the provided quaternion. 从一个四元数取得一个3x3的旋转矩阵

Name | Type | Description
--- | --- | ---
`quaternion` | Quaternion | the quaternion to use.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The 3x3 rotation matrix from this quaternion.

#### static Cesium.Matrix3.fromRotationX(angle, result) → Matrix3
Core/Matrix3.js 440

Creates a rotation matrix around the x-axis.

Name | Type | Description
--- | --- | ---
`angle` | Number | The angle, in radians, of the rotation. Positive angles are counterclockwise.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The modified result parameter, or a new Matrix3 instance if one was not provided.

##### Example:

    // Rotate a point 45 degrees counterclockwise around the x-axis.
    var p = new Cesium.Cartesian3(5, 6, 7);
    var m = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(45.0));
    var rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());

#### static Cesium.Matrix3.fromRotationY(angle, result) → Matrix3
Core/Matrix3.js 478

Creates a rotation matrix around the y-axis.

Name | Type | Description
--- | --- | ---
`angle` | Number | The angle, in radians, of the rotation. Positive angles are counterclockwise.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The modified result parameter, or a new Matrix3 instance if one was not provided.

##### Example:

    // Rotate a point 45 degrees counterclockwise around the y-axis.
    var p = new Cesium.Cartesian3(5, 6, 7);
    var m = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(45.0));
    var rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());

#### static Cesium.Matrix3.fromRotationZ(angle, result) → Matrix3
Core/Matrix3.js 516

Creates a rotation matrix around the z-axis.

Name | Type | Description
--- | --- | ---
`angle` | Number | The angle, in radians, of the rotation. Positive angles are counterclockwise.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The modified result parameter, or a new Matrix3 instance if one was not provided.

##### Example:

    // Rotate a point 45 degrees counterclockwise around the z-axis.
    var p = new Cesium.Cartesian3(5, 6, 7);
    var m = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(45.0));
    var rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());

#### static Cesium.Matrix3.fromRowMajorArray(values, result) → Matrix3
Core/Matrix3.js 205

Creates a Matrix3 instance from a row-major order array. The resulting matrix will be in column-major order.

Name | Type | Description
--- | --- | ---
`values` | Array.<Number> | The row-major order array.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The modified result parameter, or a new Matrix3 instance if one was not provided.

#### static Cesium.Matrix3.fromScale(scale, result) → Matrix3
Core/Matrix3.js 336

Computes a Matrix3 instance representing a non-uniform scale.

Name | Type | Description
--- | --- | ---
`scale` | Cartesian3 | The x, y, and z scale factors.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The modified result parameter, or a new Matrix3 instance if one was not provided.

##### Example:

    // Creates
    //   [7.0, 0.0, 0.0]
    //   [0.0, 8.0, 0.0]
    //   [0.0, 0.0, 9.0]
    var m = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));

#### static Cesium.Matrix3.fromUniformScale(scale, result) → Matrix3
Core/Matrix3.js 371

Computes a Matrix3 instance representing a uniform scale.

Name | Type | Description
--- | --- | ---
`scale` | Number | The uniform scale factor.
`result` | Matrix3 | optional The object in which the result will be stored, if undefined a new instance will be created.

##### Returns:

The modified result parameter, or a new Matrix3 instance if one was not provided.

##### Example:

    // Creates
    //   [2.0, 0.0, 0.0]
    //   [0.0, 2.0, 0.0]
    //   [0.0, 0.0, 2.0]
    var m = Cesium.Matrix3.fromUniformScale(2.0);

#### static Cesium.Matrix3.getColumn(matrix, index, result) → Cartesian3
Core/Matrix3.js 606

Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to use.
`index` | Number | The zero-based index of the column to retrieve.
`result` | Cartesian3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

##### Throws:

- DeveloperError : index must be 0, 1, or 2.

#### static Cesium.Matrix3.getElementIndex(row, column) → Number
Core/Matrix3.js 585

Computes the array index of the element at the provided row and column.

Name | Type | Description
--- | --- | ---
`row` | Number | The zero-based index of the row.
`column` | Number | The zero-based index of the column.

##### Returns:

The index of the element at the provided row and column.

##### Throws:

- DeveloperError : row must be 0, 1, or 2.
- DeveloperError : column must be 0, 1, or 2.

##### Example:

    var myMatrix = new Cesium.Matrix3();
    var column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);
    var column1Row0 = myMatrix[column1Row0Index]
    myMatrix[column1Row0Index] = 10.0;

#### static Cesium.Matrix3.getMaximumScale(matrix) → Number
Core/Matrix3.js 738

Computes the maximum scale assuming the matrix is an affine transformation. The maximum scale is the maximum length of the column vectors.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix.

##### Returns:

The maximum scale.

#### static Cesium.Matrix3.getRotation(matrix, result) → Matrix3
Core/Matrix3.js 996

Extracts the rotation assuming the matrix is an affine transformation.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter

#### static Cesium.Matrix3.getRow(matrix, index, result) → Cartesian3
Core/Matrix3.js 663

Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to use.
`index` | Number | The zero-based index of the row to retrieve.
`result` | Cartesian3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

##### Throws:

- DeveloperError : index must be 0, 1, or 2.

#### static Cesium.Matrix3.getScale(matrix, result) → Cartesian3
Core/Matrix3.js 717

Extracts the non-uniform scale assuming the matrix is an affine transformation.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix.
`result` | Cartesian3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.inverse(matrix, result) → Matrix3
Core/Matrix3.js 1221

Computes the inverse of the provided matrix.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to invert.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

##### Throws:

- DeveloperError : matrix is not invertible.

#### static Cesium.Matrix3.inverseTranspose(matrix, result) → Matrix3
Core/Matrix3.js 1268

Computes the inverse transpose of a matrix.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to transpose and invert.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.multiply(left, right, result) → Matrix3
Core/Matrix3.js 751

Computes the product of two matrices.

Name | Type | Description
--- | --- | ---
`left` | Matrix3 | The first matrix.
`right` | Matrix3 | The second matrix.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.multiplyByScalar(matrix, scalar, result) → Matrix3
Core/Matrix3.js 873

Computes the product of a matrix and a scalar.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix.
`scalar` | Number | The number to multiply by.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.multiplyByScale(matrix, scale, result) → Matrix3
Core/Matrix3.js 908

Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix on the left-hand side.
`scale` | Cartesian3 | The non-uniform scale on the right-hand side.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

##### Example:

    // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);
    Cesium.Matrix3.multiplyByScale(m, scale, m);

##### See:

- Matrix3.fromScale
- Matrix3.multiplyByUniformScale

#### static Cesium.Matrix3.multiplyByVector(matrix, cartesian, result) → Cartesian3
Core/Matrix3.js 844

Computes the product of a matrix and a column vector.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix.
`cartesian` | Cartesian3 | The column.
`result` | Cartesian3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.negate(matrix, result) → Matrix3
Core/Matrix3.js 934

Creates a negated copy of the provided matrix.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to negate.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.pack(value, array, startingIndex) → Array.<Number>
Core/Matrix3.js 60

Stores the provided instance into the provided array.

Name | Type | Default | Description
--- | --- | --- | ---
`value` | Matrix3 |  | The value to pack.
`array` | Array.<Number> |  | The array to pack into.
`startingIndex` | Number | `0` | optional The index into the array at which to start packing the elements.

##### Returns:

The array that was packed into

#### static Cesium.Matrix3.setColumn(matrix, index, cartesian, result) → Matrix3
Core/Matrix3.js 636

Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to use.
`index` | Number | The zero-based index of the column to set.
`cartesian` | Cartesian3 | The Cartesian whose values will be assigned to the specified column.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

##### Throws:

- DeveloperError : index must be 0, 1, or 2.

#### static Cesium.Matrix3.setRow(matrix, index, cartesian, result) → Matrix3
Core/Matrix3.js 692

Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to use.
`index` | Number | The zero-based index of the row to set.
`cartesian` | Cartesian3 | The Cartesian whose values will be assigned to the specified row.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

##### Throws:

- DeveloperError : index must be 0, 1, or 2.

#### static Cesium.Matrix3.subtract(left, right, result) → Matrix3
Core/Matrix3.js 817

Computes the difference of two matrices.

Name | Type | Description
--- | --- | ---
`left` | Matrix3 | The first matrix.
`right` | Matrix3 | The second matrix.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.toArray(matrix, result) → Array.<Number>
Core/Matrix3.js 549

Creates an Array from the provided Matrix3 instance. The array will be in column-major order.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to use..
`result` | Array.<Number> | optional The Array onto which to store the result.

##### Returns:

The modified Array parameter or a new Array instance if one was not provided.

#### static Cesium.Matrix3.transpose(matrix, result) → Matrix3
Core/Matrix3.js 959

Computes the transpose of the provided matrix.

Name | Type | Description
--- | --- | ---
`matrix` | Matrix3 | The matrix to transpose.
`result` | Matrix3 | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Matrix3.unpack(array, startingIndex, result) → Matrix3
Core/Matrix3.js 89

Retrieves an instance from a packed array.

Name | Type | Default | Description
--- | --- | --- | ---
`array` | Array.<Number> |  | The packed array.
`startingIndex` | Number | `0` | optional The starting index of the element to be unpacked.
`result` | Matrix3 |  | optional The object into which to store the result.

##### Returns:

The modified result parameter or a new Matrix3 instance if one was not provided.