The angle value in degrees.

@param int $degree

@return Rotate
@throws \InvalidArgumentException
169647
public function setAngleDegrees($degree)
	{
		if ( ! is_numeric($degree))
		{
			throw new \InvalidArgumentException('Angle degrees must be a numeric.');
		}
		
		$this->setAngle($degree * pi() / 180);
		
		return $this;
	}
521037
public function rotate($degree, $background = 0)
    {
        //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;
    }
324181
public function rotate($angle, $bg = '000000') {
        if (!$angle) {
            throw new InvalidArgumentException('angle must be specified');
        }

        return $this->addTransformation(sprintf('rotate:angle=%d,bg=%s', (int) $angle, $bg));
    }
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);
        }
    }
1360129
public function rotate($x = 90)
    {
        $this->gdExtensionCheck();

        $file = $this->getFilePath();
        switch ($this->getExt()) {
            case 'png':
                $kaynak = imagecreatefrompng($file);
                unlink($file);
                $rotated = imagerotate($kaynak, $x, 0);
                imagepng($rotated, $file, 10);
                break;
            case 'jpg':
                $kaynak = imagecreatefromjpeg($file);
                unlink($file);

                $rotated = imagerotate($kaynak, $x, 0);
                imagejpeg($rotated, $file, 100);
                break;
            case 'gif':
                $kaynak = imagecreatefromgif($file);
                unlink($file);

                $rotated = imagerotate($kaynak, $x, 0);
                imagegif($rotated, $file);
                break;
        }
        imagedestroy($kaynak);

        return $this;
    }
376426
public function rotate($angle, $backgroundColor = -1) {
		if($backgroundColor === -1) {
			$backgroundColor = hexdec($this->getBackgroundColor()->getHexValue());
		}
		$this->image = imagerotate($this->image, $angle, (int) $backgroundColor);
		$this->getSize();
		return $this;
	}
1303089
public void rotate(double angle) {
        double s = Math.sin(angle);
        double c = Math.cos(angle);

        double temp1 = m00;
        double temp2 = m01;
        m00 =  c * temp1 + s * temp2;
        m01 = -s * temp1 + c * temp2;
        temp1 = m10;
        temp2 = m11;
        m10 =  c * temp1 + s * temp2;
        m11 = -s * temp1 + c * temp2;
    }
848504
public function rotate($degrees, $background = 0xffffff, $alpha = 1.0)
    {
        $this->do_rotate($degrees, $background, $alpha);

        return $this;
    }
411909
public function invertDock($orientation = '')
    {
        // Return value
        if (empty($orientation)) {
            return $this->invertDock;
        }

        // Set value
        $this->invertDock = $orientation;

        return $this;
    }
583353
public function setDirection($direction)
    {
        if (!in_array($direction, self::$supportedFlipDirection)) {
            throw new \InvalidArgumentException(sprintf(
                    '"%s" Is Not Valid Flip Direction', (string) $direction
            ));
        }
        $this->flipDirection = $direction;

        return $this;
    }
152644
public function rotate($degrees)
    {

        $a = deg2rad($degrees);
        $cosA = cos($a);
        $sinA = sin($a);

        return $this->multiply(new self($cosA, $sinA, -$sinA, $cosA, 0, 0));
    }
327723
private function setShadowAngle($angle)
    {
        if ($angle !== null) {
            $this->shadowProperties['direction'] = (string) $this->getExcelPointsAngle($angle);
        }

        return $this;
    }
1104485
public function rotate($angle) 
    {
        $sin = sin($angle);
        $cos = cos($angle);
        return $this->multiply($cos, $sin, -$sin, $cos, 0, 0);
    }
598231
public Img rotate(int degree) {
		final BufferedImage image = getValidSrcImg();
		int width = image.getWidth(null);
		int height = image.getHeight(null);
		final Rectangle rectangle = calcRotatedSize(width, height, degree);
		final BufferedImage targetImg = new BufferedImage(rectangle.width, rectangle.height, getTypeInt());
		Graphics2D graphics2d = targetImg.createGraphics();
		// 抗锯齿
		graphics2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
		// 从中心旋转
		graphics2d.translate((rectangle.width - width) / 2, (rectangle.height - height) / 2);
		graphics2d.rotate(Math.toRadians(degree), width / 2, height / 2);
		graphics2d.drawImage(image, 0, 0, null);
		graphics2d.dispose();
		this.targetImage = targetImg;
		return this;
	}
399134
public void rotate(double angle)
    {
        final double x2 = x + width;
        final double y2 = y;

        final double x3 = x2;
        final double y3 = y + height;

        final double x4 = x;
        final double y4 = y3;

        final double cx = x + width / 2.0;
        final double cy = y + height / 2.0;

        final double a = UtilMath.wrapDouble(angle, 0, 360);
        final double cos = UtilMath.cos(a);
        final double sin = UtilMath.sin(a);

        final double rx1 = cos * (x - cx) - sin * (y - cy) + cx;
        final double ry1 = sin * (x - cx) + cos * (y - cy) + cy;

        final double rx2 = cos * (x2 - cx) - sin * (y2 - cy) + cx;
        final double ry2 = sin * (x2 - cx) + cos * (y2 - cy) + cy;

        final double rx3 = cos * (x3 - cx) - sin * (y3 - cy) + cx;
        final double ry3 = sin * (x3 - cx) + cos * (y3 - cy) + cy;

        final double rx4 = cos * (x4 - cx) - sin * (y4 - cy) + cx;
        final double ry4 = sin * (x4 - cx) + cos * (y4 - cy) + cy;

        final double nx1 = Math.min(Math.min(Math.min(rx1, rx2), rx3), rx4);
        final double ny1 = Math.max(Math.max(Math.max(ry1, ry2), ry3), ry4);

        final double nx2 = Math.max(Math.max(Math.max(rx1, rx2), rx3), rx4);

        final double ny3 = Math.min(Math.min(Math.min(ry1, ry2), ry3), ry4);

        x = nx1;
        y = ny3;
        width = nx2 - nx1;
        height = ny1 - ny3;
    }
1121339
def _rotate(degrees:uniform):
    ""
    angle = degrees * math.pi / 180
    return [[cos(angle), -sin(angle), 0.],
            [sin(angle),  cos(angle), 0.],
            [0.        ,  0.        , 1.]]
1261137
public Angle turn(Angle angle)
    {
        if (angle.getRadians() < Math.PI)
        {
            return add(angle, true);
        }
        else
        {
            return add(angle.toHalfAngle(), false);
        }
    }