src/MatrixMath.php
public static function makeRotationX(float $angle, string $type = Math::DEGREES) : Matrix33 {
        if ($type === Math::DEGREES) {
            $angle = Math::degToRad($angle);
        }

        return new Matrix33(
            1, 0, 0,
            0, cos($angle), - sin($angle),
            0, sin($angle), cos($angle)
        );
    }
public static function makeRotationX(float $angle, string $type = Math::DEGREES) : Matrix33 {
        if ($type === Math::DEGREES) {
            $angle = Math::degToRad($angle);
        }

        return new Matrix33(
            1, 0, 0,
            0, cos($angle), - sin($angle),
            0, sin($angle), cos($angle)
        );
    }
public static function makeRotationX ( float $ angle , string $ type = Math :: DEGREES ) : Matrix33 { if ( $ type === Math :: DEGREES ) { $ angle = Math :: degToRad ( $ angle ) ; } return new Matrix33 ( 1 , 0 , 0 , 0 , cos ( $ angle ) , - sin ( $ angle ) , 0 , sin ( $ angle ) , cos ( $ angle ) ) ; }
Create a rotation matrix with given X angle rotation.

@param float $angle
@param string $type If degrees or radians, see Math constants.
@return Matrix33
Create a rotation matrix with given X angle rotation .