src/Image.php
public function rotate($degrees, $background = null, $random = false)
    {
        if ($background) {
            $background = trim($background);
        } else {
            $background = "ffffff";
        }

        if ($random) {
            $deg = abs((float) $degrees);
            $degrees = rand(-1 * $deg, $deg);
        }

        $this->image->rotate($degrees, $background);
    }
public function rotate($degrees, $background = null, $random = false)
    {
        if ($background) {
            $background = trim($background);
        } else {
            $background = "ffffff";
        }

        if ($random) {
            $deg = abs((float) $degrees);
            $degrees = rand(-1 * $deg, $deg);
        }

        $this->image->rotate($degrees, $background);
    }
public function rotate ( $ degrees , $ background = null , $ random = false ) { if ( $ background ) { $ background = trim ( $ background ) ; } else { $ background = "ffffff" ; } if ( $ random ) { $ deg = abs ( ( float ) $ degrees ) ; $ degrees = rand ( - 1 * $ deg , $ deg ) ; } $ this -> image -> rotate ( $ degrees , $ background ) ; }
Rotate an image by the given number of degrees.

@param  int $degrees The number of (clockwise) degrees to rotate the image.
@param  string|null $background hexadecimal background color
@param  bool $random
Rotate an image by the given number of degrees .