Skip to content

Matrix4 Identity

Kion edited this page Sep 16, 2017 · 2 revisions

mat4 identity

Description

Overwrites a provided matrix with an identity matrix.

Arguments

  • mat4 m - the matrix provided to be overwritten

Source

void mat4_identity(mat4 m) {
	
	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] = 1.0f;
	m[M_12] = 0.0f;
	m[M_13] = 0.0f;
	m[M_20] = 0.0f;
	m[M_21] = 0.0f;
	m[M_22] = 1.0f;
	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