function computeRotation (options) {
  const rot = createRotationMatrix({ orientation: options.orientation })
  const angle = Math.atan2(-rot[0][1], rot[0][0])
  let inDegrees = false
  if ('inDegrees' in options) {
    inDegrees = true
  }
  if (inDegrees) {
    return angle / (Math.PI / 180)
  } else {
    return angle
  }
}
/**
 * Computes the rotation of the image with respect to the frame of reference.
 *
 * @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
 * @param {boolean} options.inDegrees - Whether angle should be returned in degrees instead of radians
 * @returns {number} Angle
 */
Computes the rotation of the image with respect to the frame of reference.
@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
@param {boolean} options.inDegrees - Whether angle should be returned in degrees instead of radians
@returns {number} Angle
Computes the rotation of the image with respect to the frame of reference . @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 @param { boolean } options . inDegrees - Whether angle should be returned in degrees instead of radians @returns { number } Angle
function computeRotation (options) {
  const rot = createRotationMatrix({ orientation: options.orientation })
  const angle = Math.atan2(-rot[0][1], rot[0][0])
  let inDegrees = false
  if ('inDegrees' in options) {
    inDegrees = true
  }
  if (inDegrees) {
    return angle / (Math.PI / 180)
  } else {
    return angle
  }
}
function computeRotation ( options ) { const rot = createRotationMatrix ( { orientation : options . orientation } ) const angle = Math . atan2 ( - rot [ 0 ] [ 1 ] , rot [ 0 ] [ 0 ] ) let inDegrees = false if ( 'inDegrees' in options ) { inDegrees = true } if ( inDegrees ) { return angle / ( Math . PI / 180 ) } else { return angle } }
Computes the rotation of the image with respect to the frame of reference.
Computes the rotation of the image with respect to the frame of reference .