function createRotationMatrix (options) {
  if (!('orientation' in options)) {
    throw new Error('Option "orientation" is required.')
  }
  const orientation = options.orientation
  const rowDirection = orientation.slice(0, 3)
  const columnDirection = orientation.slice(3, 6)
  return [
    [rowDirection[0], columnDirection[0]],
    [rowDirection[1], columnDirection[1]],
    [rowDirection[2], columnDirection[3]]
  ]
}
/**
 * Creates a rotation matrix.
 *
 * @param {Object} options - Options
 * @param {number[]} options.orientation - Direction cosines along the row and column direction of the Total Pixel Matrix for each of the three axis of the slide coordinate system
 * @returns {number[][]} 2x2 rotation matrix
 */
Creates a rotation matrix.
@param {Object} options - Options
@param {number[]} options.orientation - Direction cosines along the row and column direction of the Total Pixel Matrix for each of the three axis of the slide coordinate system
@returns {number[][]} 2x2 rotation matrix
Creates a rotation matrix . @param { Object } options - Options @param { number [] } options . orientation - Direction cosines along the row and column direction of the Total Pixel Matrix for each of the three axis of the slide coordinate system @returns { number [] [] } 2x2 rotation matrix
function createRotationMatrix (options) {
  if (!('orientation' in options)) {
    throw new Error('Option "orientation" is required.')
  }
  const orientation = options.orientation
  const rowDirection = orientation.slice(0, 3)
  const columnDirection = orientation.slice(3, 6)
  return [
    [rowDirection[0], columnDirection[0]],
    [rowDirection[1], columnDirection[1]],
    [rowDirection[2], columnDirection[3]]
  ]
}
function createRotationMatrix ( options ) { if ( ! ( 'orientation' in options ) ) { throw new Error ( 'Option "orientation" is required.' ) } const orientation = options . orientation const rowDirection = orientation . slice ( 0 , 3 ) const columnDirection = orientation . slice ( 3 , 6 ) return [ [ rowDirection [ 0 ] , columnDirection [ 0 ] ] , [ rowDirection [ 1 ] , columnDirection [ 1 ] ] , [ rowDirection [ 2 ] , columnDirection [ 3 ] ] ] }
Creates a rotation matrix.
Creates a rotation matrix .