Rotates this viewport to the angle specified.
@function
@return {OpenSeadragon.Viewport} Chainable.
176397
function(degrees) {
        if (!this.viewer || !this.viewer.drawer.canRotate()) {
            return this;
        }
        this.degrees = $.positiveModulo(degrees, 360);
        this._setContentBounds(
            this.viewer.world.getHomeBounds(),
            this.viewer.world.getContentFactor());
        this.viewer.forceRedraw();

        /**
         * Raised when rotation has been changed.
         *
         * @event rotate
         * @memberof OpenSeadragon.Viewer
         * @type {object}
         * @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
         * @property {Number} degrees - The number of degrees the rotation was set to.
         * @property {?Object} userData - Arbitrary subscriber-defined object.
         */
        this.viewer.raiseEvent('rotate', {"degrees": degrees});
        return this;
    }
665202
function(options) {
        if (!options || isNaN(options.angle)) {
            throw new Error('angle needs to be specified');
        }

        var bg = (options.bg || '000000').replace(/^#/, '');
        return this.append('rotate:angle=' + options.angle + ',bg=' + bg);
    }
1085128
function getRotation(start, end) {
  return getAngle(end[1], end[0], PROPS_CLIENT_XY) - getAngle(start[1], start[0], PROPS_CLIENT_XY);
}
242697
function setAngleCallback(angleFunction){

    if (typeof(angleFunction) == 'function'){

        gazeCollector.setAngleCallback(angleFunction);
        callbacks.angleCallback = angleFunction;

    }
    else
        logger.warn('Trying to set a non function object as angle callback');
    
}
544361
public Vector3f rotateX(float angle, Vector3f dest) {
        float sin = (float) Math.sin(angle), cos = (float) Math.cosFromSin(sin, angle);
        float y = this.y * cos - this.z * sin;
        float z = this.y * sin + this.z * cos;
        dest.x = this.x;
        dest.y = y;
        dest.z = z;
        return dest;
    }
278737
def rotation(angle):
    """"""
    return N.array([[N.cos(angle),-N.sin(angle),0],
        [N.sin(angle), N.cos(angle),0],
        [0           , 0           ,1]])
21784
def _update_textrotation(self, angle):
        """"""

        states = {0: 0, -90: 1, 180: 2, 90: 3}

        try:
            self.rotation_tb.state = states[round(angle)]
        except KeyError:
            self.rotation_tb.state = 0

        self.rotation_tb.toggle(None)
        self.rotation_tb.Refresh()
462431
function(vector) {
    var angle = this.angleFrom(vector);
    return (angle === null) ? null : (angle <= Sylvester.precision);
  }
155287
function () {
    var body = this.body;
    var el = this.el;
    el.setAttribute('position', body.position);
    el.setAttribute('rotation', {
      x: deg(body.quaternion.x),
      y: deg(body.quaternion.y),
      z: deg(body.quaternion.z)
    });
  }
469941
function () {
		var bBox,
			width,
			height,
			rotation = this.rotation,
			rad = rotation * deg2rad;

		try { // fails in Firefox if the container has display: none
			// use extend because IE9 is not allowed to change width and height in case
			// of rotation (below)
			bBox = extend({}, this.element.getBBox());
		} catch (e) {
			bBox = { width: 0, height: 0 };
		}
		width = bBox.width;
		height = bBox.height;

		// adjust for rotated text
		if (rotation) {
			bBox.width = mathAbs(height * mathSin(rad)) + mathAbs(width * mathCos(rad));
			bBox.height = mathAbs(height * mathCos(rad)) + mathAbs(width * mathSin(rad));
		}

		return bBox;
	}
1370153
def rotateTo(self, angle):
        
        self._transmogrophy(angle, self.percent, self.scaleFromCenter, self.flipH, self.flipV)
1105537
function angleTo(e) {
         var a = this.getBounds();
         var b = e.getBounds(); // the me.Vector2d object also implements the same function, but
         // we have to use here the center of both entities

         var ax = b.pos.x + b.width / 2 - (a.pos.x + a.width / 2);
         var ay = b.pos.y + b.height / 2 - (a.pos.y + a.height / 2);
         return Math.atan2(ay, ax);
       }
1217403
function rotate(out, a, angle) {
  var c = Math.cos(angle),
      s = Math.sin(angle)
  var x = a[0],
      y = a[1]

  out[0] = x * c - y * s
  out[1] = x * s + y * c

  return out
}
1345385
public Rectangle rotate() {
		Rectangle rect = new Rectangle(lly, llx, ury, urx);
		rect.rotation = rotation + 90;
		rect.rotation %= 360;
		return rect;
	}
84555
function rotate(a, ang){
    return {
      x: a.x * Math.cos(ang) - a.y * Math.sin(ang),
      y: a.x * Math.sin(ang) + a.y * Math.cos(ang)};
  }
111578
function rotate($angle, $x, $y)
    {
        $y = $this->currentPageSize["height"] - $y;

        $a = deg2rad($angle);
        $cos_a = cos($a);
        $sin_a = sin($a);

        $tm = array(
            $cos_a,
            -$sin_a,
            $sin_a,
            $cos_a,
            $x - $sin_a * $y - $cos_a * $x,
            $y - $cos_a * $y + $sin_a * $x,
        );

        $this->transform($tm);
    }
859051
function(v) {
        //var theta = -1 * (v % 360); //angle always between 0 and 359
        var difference = this._rotation - v;
        // skip if there's no rotation!
        if (difference === 0) return;
        else this._rotation = v;

        this._calculateMBR();

        this.trigger("Rotate", difference);
    }