Skip to content

Matrix4 RotateX

Kion edited this page Sep 16, 2017 · 1 revision

mat4 rotate x

Description

Arguments

Source

void mat4_rotate_x(mat4 m, float x, mat4 dst) {

	m[M_00] = 1.0f;
	m[M_01] = 0.0f;
	m[M_02] = 0.0f;
	m[M_03] = 0.0f;
	m[M_10] = 0.0f;
	m[M_11] = cos(x);
	m[M_12] =-sin(x);
	m[M_13] = 0.0f;
	m[M_20] = 0.0f;
	m[M_21] = sin(x);
	m[M_22] = cos(x);
	m[M_23] = 0.0f;
	m[M_30] = 0.0f;
	m[M_31] = 0.0f;
	m[M_32] = 0.0f;
	m[M_33] = 1.0f;

}

DashGL

  • Home
  • Shaders
  • Vector2
  • Vector3
  • Vector4
  • Matrix4x4

Vector 3


Matrix 4x4

Clone this wiki locally