fix rotation changes
16862
@Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);
        mAreDimensionsInvalid = true;
    }
53375
function fixAngleOverlap(list) {
    var firstItem = list[0];
    var lastItem = list[list.length - 1];
    if (firstItem
        && lastItem
        && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4
    ) {
        list.pop();
    }
}
9774
public function rotate($rotation)
    {
        if(isset($this->edited)){
            $this->getInfo();
            $this->edited =  imagerotate($this->edited, $rotation, 0);
        } else {
            $this->edited =  imagerotate($this->original, $rotation, 0);
        }

    }
1159640
private function rotateRR()
	{
		$value_before		=& $this->value;
		$left_before		=& $this->left;
		$this->value		=& $this->right->value;
		$this->left			=& $this->right;
		$this->right		=& $this->right->right;
		$this->left->right	=& $this->left->left;
		$this->left->left	=& $left_before;
		$this->left->value	=& $value_before;
	}
309000
void willRotate(UIInterfaceOrientation toOrient, double duration) {
    if (orientListener != null) {
      orientListener.willRotate(toOrient, duration);
    }
  }
1211601
function fixCurves() {
                        if (point[0] == 0) start = point[1];
                        if (point[0] == 1) end = point[1];
                        var points = filter[curves.name];
                        var foundStart = false;
                        var foundEnd = false;
                        for (var i = 0; i < points.length; i++) {
                            var p = points[i];
                            if (p[0] == 0) {
                                foundStart = true;
                                if (point[0] == 0 && p != point) points.splice(i--, 1);
                            } else if (p[0] == 1) {
                                foundEnd = true;
                                if (point[0] == 1 && p != point) points.splice(i--, 1);
                            }
                        }
                        if (!foundStart) points.push([0, start]);
                        if (!foundEnd) points.push([1, end]);
                    }
482195
public void rotate(Quaternion rotation, Point3D pivot) {
		if (pivot!=null) {
			// Change the center
			Transform3D m1 = new Transform3D();
			m1.setTranslation(-pivot.getX(), -pivot.getY(), -pivot.getZ());
			Transform3D m2 = new Transform3D();
			m2.setRotation(rotation);
			Transform3D m3 = new Transform3D();
			m3.setTranslation(pivot.getX(), pivot.getY(), pivot.getZ());

			Transform3D r = new Transform3D();
			r.mul(m1, m2);
			r.mul(m3);
			r.transform(this.getCenter());
		}
		rotate(rotation);
	}
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()
699464
public void rotationUpdate(final float angleNew, final boolean animate) {
        if (animate) {
            if (Math.abs(angle0 - angleNew) > ANGLE_DELTA_THRESHOLD) {
                angle0 = angleNew;
                this.invalidate();
            }
            animationOn = true;
        } else {
            angle1 = angleNew;
            angle2 = angleNew;
            angle0 = angleNew;
            angleLastDrawn = angleNew;
            this.invalidate();
            animationOn = false;
        }
    }
1196691
protected void onOrientationChanged(int lastOrientation, int currentOrientation) {
        if (controller != null) {
            controller.onOrientationChanged(
                    parseOrientation(lastOrientation),
                    parseOrientation(currentOrientation));
        }
    }
233021
public void setRotation(String rotation) {
        if (rotation != null) {
            try {
                setRotation(Integer.parseInt(rotation));
            } catch (NumberFormatException e) {
                setRotation(-1);
            }
        }
    }
110270
function () {
		var bones = this.bones;
		for (var i = 0, n = bones.length; i < n; i++) {
			var bone = bones[i];
			bone.rotationIK = bone.rotation;
		}
		var i = 0, last = this.boneCache.length - 1;
		while (true) {
			var cacheBones = this.boneCache[i];
			for (var ii = 0, nn = cacheBones.length; ii < nn; ii++)
				cacheBones[ii].updateWorldTransform();
			if (i == last) break;
			this.ikConstraints[i].apply();
			i++;
		}
	}
1139133
def reset(self):
        """"""

        sun = ephem.Sun()
        this_time = Time(self.date.get(), scale='utc')
        sun.compute(this_time.iso)
        self.sun = Coord((sun.ra, sun.dec))

        self.doplot()
        self.plot_pointings()
1082259
def _rotate_tr(self):
        """"""
        up, forward, right = self._get_dim_vectors()
        self.transform.rotate(self.elevation, -right)
        self.transform.rotate(self.azimuth, up)
7160
def __handle_scale_rot(self):
        """"""
        if self.__is_rot_pending:
            self.__execute_rot(self.untransformed_image)
            self.__is_rot_pending = False

            # Scale the image using the recently rotated surface to keep the orientation correct
            self.__execute_scale(self.image, self.image.get_size())
            self.__is_scale_pending = False

        # The image is not rotating while scaling, thus use the untransformed image to scale.
        if self.__is_scale_pending:
            self.__execute_scale(self.untransformed_image, self.untransformed_image.get_size())
            self.__is_scale_pending = False
245259
function(e) {
        var dx,
            dy,
            rot = this.rotation * DEG_TO_RAD,
            points = this.map.points;

        // Depending on the change of axis, move the corners of the rectangle appropriately
        if (e.axis === "w") {
            if (rot) {
                dx = e.amount * Math.cos(rot);
                dy = e.amount * Math.sin(rot);
            } else {
                dx = e.amount;
                dy = 0;
            }

            // "top right" point shifts on change of w
            points[2] += dx;
            points[3] += dy;
        } else {
            if (rot) {
                dy = e.amount * Math.cos(rot);
                dx = -e.amount * Math.sin(rot);
            } else {
                dx = 0;
                dy = e.amount;
            }

            // "bottom left" point shifts on change of h
            points[6] += dx;
            points[7] += dy;
        }

        // "bottom right" point shifts on either change
        points[4] += dx;
        points[5] += dy;
    }
1240826
public void rotate(Quaternion rotation) {
		Transform3D m = new Transform3D();
		m.setRotation(rotation);
		m.transform(this.getSegmentVector());
		this.getSegmentVector().normalize();
	}