function computeFrobeniusNorm(matrix) {
  let norm = 0.0;
  for (let i = 0; i < 9; ++i) {
    const temp = matrix[i];
    norm += temp * temp;
  }

  return Math.sqrt(norm);
}
Computes the transpose of the provided matrix.

@param {Matrix3} matrix The matrix to transpose.
@param {Matrix3} result The object onto which to store the result.
@returns {Matrix3} The modified result parameter.