Rotates an image with a given angle

@param float $angle Rotation angle in degrees
185516
public function rotate($angle)
    {
        $this->setResource(imagerotate($this->resource, $angle , $this->BackgroundColor));
    }
97600
public function rotate($angle = 0)
    {
        if ($this->resource) {
            $this->resource = imagerotate($this->resource, $angle, 0);
        }

        return $this;
    }
1319750
public void setConeInnerAngle (float angle)
    {
        if (_coneInnerAngle != angle) {
            AL10.alSourcef(_id, AL10.AL_CONE_INNER_ANGLE, _coneInnerAngle = angle);
        }
    }
1270988
public static BufferedImage rotateImage(BufferedImage image, double angle) {
        double theta = Math.toRadians(angle);
        double sin = Math.abs(Math.sin(theta));
        double cos = Math.abs(Math.cos(theta));
        int w = image.getWidth();
        int h = image.getHeight();
        int newW = (int) Math.floor(w * cos + h * sin);
        int newH = (int) Math.floor(h * cos + w * sin);

        BufferedImage tmp = new BufferedImage(newW, newH, image.getType());
        Graphics2D g2d = tmp.createGraphics();
        g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                RenderingHints.VALUE_INTERPOLATION_BICUBIC);
        g2d.translate((newW - w) / 2, (newH - h) / 2);
        g2d.rotate(theta, w / 2, h / 2);
        g2d.drawImage(image, 0, 0, null);
        g2d.dispose();
        return tmp;
    }
732963
public function skewX(Point $center, Angle $angle)
	{
		$this->x += $angle->tan * ($this->y - $center->y);
		return $this;
	}
4390
public function setOrientation($orientation)
    {
        if (in_array($orientation, Orientation::asArray(), true) === true) {
            $this->orientation = $orientation;
        } else {
            $msg = "The 'orientation' argument must be a value from the Orientation enumeration.";
            throw new InvalidArgumentException($msg);
        }
    }
835932
public function rotate($degree, $background = 0)
    {
        //argument test
        Argument::i()
            //Argument 1 must be a number
            ->test(1, 'numeric')
            //Argument 2 must be a number
            ->test(2, 'numeric');

        //rotate the image
        $rotate = imagerotate($this->resource, $degree, $background);

        //destroy the original resource
        imagedestroy($this->resource);

        //assign the new resource
        $this->resource = $rotate;

        return $this;
    }
426419
public function rotate($angle = 90, $background = '#fff', $ignore = 0) {
		$this->image = imagerotate($this->image, $angle, $this->getColorWithRGB($background), $ignore);
		return $this->image !== false;
	}
493525
public static void rotate(Image image, int degree, ImageOutputStream out) throws IORuntimeException {
		writeJpg(rotate(image, degree), out);
	}
985994
public void setAngle(float angle) {
        this.angle = angle;
        float cos = (float) Math.cos(angle);
        float sin = (float) Math.sin(angle);
        m00 = cos;
        m01 = sin;
        m10 = -sin;
        m11 = cos;
    }
1104485
public function rotate($angle) 
    {
        $sin = sin($angle);
        $cos = cos($angle);
        return $this->multiply($cos, $sin, -$sin, $cos, 0, 0);
    }
1258904
function rotate(angle) {
         if (angle !== 0) {
           var a = this.val,
               a0 = a[0],
               a1 = a[1],
               a3 = a[3],
               a4 = a[4],
               s = Math.sin(angle),
               c = Math.cos(angle);
           a[0] = a0 * c + a3 * s;
           a[1] = a1 * c + a4 * s;
           a[3] = a0 * -s + a3 * c;
           a[4] = a1 * -s + a4 * c;
         }

         return this;
       }
953793
public void rotate(Vector3D axis, double angle) {
		Quaternion q = new Quaternion();
		q.setAxisAngle(axis, angle);
		rotate(q, null);
	}
485123
public function do_rotate($degrees, $background = 0xffffff, $alpha = 1.0)
    {
        $transparent = imagecolorallocatealpha($this->_image, ($background >> 16) & 0xFF, ($background >> 8) & 0xFF,
            $background & 0xFF, $alpha * 127);
        $image = imagerotate($this->_image, 360 - $degrees, $transparent, true);
        imagealphablending($image, false);
        imagesavealpha($image, true);

        imagedestroy($this->_image);
        $this->_image = $image;
        $this->_width = imagesx($image);
        $this->_height = imagesy($image);

        return $this;
    }
408330
function photos_transform_rotate($photo_id, $degrees)
    {
        /** http://www.flickr.com/services/api/flickr.photos.transform.rotate.html */
        $this->request("flickr.photos.transform.rotate", array("photo_id" => $photo_id, "degrees" => $degrees), TRUE);
        return $this->parsed_response ? true : false;
    }
1131430
public function flip($direction = Image::FLIP_HORIZONTAL): Image
	{
		$this->processor->flip($direction);

		return $this;
	}
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);
    }