---
layout: doc
title: general / rotate_x
---
# rotate_x

### NAME

    rotate_x() - apply an x-axis rotation to a matrix

### SYNOPSIS

    float array rotate_x( float array matrix, float angle );

### DESCRIPTION

    Applies a rotation around the x axis to matrix and returns matrix.  The
    angle is specified in degrees.  The argument must be a 16 element float
    array in the format returned by id_matrix().

    This efun modifies the supplied matrix array in place.  Internally, the
    driver creates an x-axis rotation matrix and multiplies the current matrix
    by that rotation matrix.

### SEE ALSO

    id_matrix(3), rotate_y(3), rotate_z(3), translate(3), scale(3)
