Apply rotation and/or mirroring.
327588
def do_rotation(self, mirror, rot):
        """"""
        if (not mirror and rot == 0.0):
            self.logger.debug("rotation: no rotation (nop)")
        else:
            # FIXME - with PIL one can use the transpose() method to do 90deg
            # FIXME - rotations as well as mirroring. This would be more efficient
            # FIXME - for these cases than mirror _then_ rotate.
            if (mirror):
                self.logger.debug("rotation: mirror (about vertical axis)")
                self.image = self.image.transpose(Image.FLIP_LEFT_RIGHT)
            if (rot != 0.0):
                self.logger.debug("rotation: by %f degrees clockwise" % (rot))
                self.image = self.image.rotate(-rot, expand=True)
71251
public void apply() {
		// see if the distortion class needs to be created again
		if( distorter == null ) {
			Class typeOut = output.getImageType().getImageClass();
			switch( input.getImageType().getFamily() ) {
				case GRAY:
					distorter = FactoryDistort.distortSB(cached, (InterpolatePixelS)interp, typeOut);
					break;

				case PLANAR:
					distorter = FactoryDistort.distortPL(cached, (InterpolatePixelS)interp, typeOut);
					break;

				case INTERLEAVED:
					distorter = FactoryDistort.distortIL(cached, (InterpolatePixelMB) interp, output.getImageType());
					break;

				default:
					throw new IllegalArgumentException("Unsupported image type");
			}
		}
		distorter.setModel(outputToInput);

		distorter.apply(input,output);
	}
1236305
function _doRotate() {
    _this.rotate(file, options, function(err, rotated) {
      if (err) {
        _this.emit('error', err);
        return;
      }
      if (rotated) {
        _this.emit('rotate', file);
      }
    });
  }
1257295
def OnCellTextRotation(self, event):
        """"""

        with undo.group(_("Rotation")):
            self.grid.actions.toggle_attr("angle")

        self.grid.ForceRefresh()

        self.grid.update_attribute_toolbar()

        if is_gtk():
            try:
                wx.Yield()
            except:
                pass

        event.Skip()
731151
def rotate_window(self, count=1):
        "  "
        w = self.get_active_window()
        w.rotate(count=count)
845483
public function rotate()
	{
		// update the session id rotation timer
		if ($this->rotationInterval)
		{
			$this->rotationTimer = time() + $this->rotationInterval;
		}

		// regenerate the session id
		$this->driver->regenerate($this);
	}
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)
    });
  }
1181003
function() {
        var layer = this.layer;
        for(var i=0; i<8; ++i) {
            if(this.rotate && i % 2 === 0) {
                layer.drawFeature(this.rotationHandles[i/2],
                    this.rotationHandleSymbolizer);
            }
            layer.drawFeature(this.handles[i], this.renderIntent);
        }
    }
781293
def rotate(prefixes, hosts, **kwargs):
    

    rotator = Rotator(pyes.ES(hosts), **kwargs)

    for prefix in prefixes:
        rotator.rotate(prefix)
581662
function () {
    var el = this.el;

    this.savedPose.position.copy(el.object3D.position);
    this.savedPose.rotation.copy(el.object3D.rotation);
    this.hasSavedPose = true;
  }
946995
def y_rotate(rotationAmt):
        """"""
        ma4 = Matrix4((math.cos(rotationAmt), 0, math.sin(rotationAmt), 0),
                      (0, 1, 0, 0),
                      (-math.sin(rotationAmt), 0, math.cos(rotationAmt), 0),
                      (0, 0, 0, 1))
        return ma4
584799
def setOrientation( self, orientation ):
        
        super(XToolBar, self).setOrientation(orientation)
        self.refreshButton()
142967
public void setFoldRotation(float rotation) {
        foldRotation = rotation;

        topPart.applyFoldRotation(rotation);
        bottomPart.applyFoldRotation(rotation);

        setInTransformation(rotation != 0f);

        scaleFactor = 1f;

        if (isAutoScaleEnabled && width > 0) {
            double sin = Math.abs(Math.sin(Math.toRadians(rotation)));
            float dw = (float) (height * sin) * CAMERA_DISTANCE_MAGIC_FACTOR;
            scaleFactor = width / (width + dw);

            setScale(scale);
        }
    }
1356977
private void combineWithTranslation(Matrix4d rotation) {
		rotation.setTranslation(centroid);
		rotation.mul(rotation, centroidInverse);
	}
597161
public void rotate(double angle_in_Radians) {
		Transformation2D temp = new Transformation2D();
		temp.setRotate(angle_in_Radians);
		multiply(temp);
	}
1092908
def set_rotation(self, rotation):
        """"""
        self._rotation = np.radians(rotation)
        self._polar.set_theta_offset(self._rotation + np.pi / 2.0)
        self.transData.invalidate()
        self.transAxes.invalidate()
        self._set_lim_and_transforms()
538469
public void updateFrontFacingRotation(float rotation) {
        if (!Float.isNaN(rotation) && !equal(rotation, frontFacingRotation)) {
            final float oldRotation = frontFacingRotation;
            frontFacingRotation = rotation % 360;
            for (OnFrontRotationChangedListener listener : mOnFrontRotationChangedListeners) {
                try {
                    listener.onFrontRotationChanged(this, frontFacingRotation, oldRotation);
                } catch (Exception e) {
                    e.printStackTrace();
                    Log.e(TAG, e, "updateFrontFacingRotation()");
                }
            }
        }
    }