* Sets this matrix as a rotational transformation around the X axis by * the given angle. * * @param {number} theta - The rotation in radians. * @return {Matrix4} A reference to this matrix.
( theta )
| 870 | * @return {Matrix4} A reference to this matrix. |
| 871 | */ |
| 872 | makeRotationX( theta ) { |
| 873 | |
| 874 | const c = Math.cos( theta ), s = Math.sin( theta ); |
| 875 | |
| 876 | this.set( |
| 877 | |
| 878 | 1, 0, 0, 0, |
| 879 | 0, c, - s, 0, |
| 880 | 0, s, c, 0, |
| 881 | 0, 0, 0, 1 |
| 882 | |
| 883 | ); |
| 884 | |
| 885 | return this; |
| 886 | |
| 887 | } |
| 888 | |
| 889 | /** |
| 890 | * Sets this matrix as a rotational transformation around the Y axis by |
no test coverage detected