Skip to content

Commit

Permalink
Sure, compiler. Complain now.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-n committed Sep 16, 2015
1 parent bae65e0 commit 1226e68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions matrix.cpp
Expand Up @@ -161,16 +161,16 @@ mat4f mat4f_perspective(float fov, float aspect, float zNear, float zFar)
return ret;
}

mat4f mat4f_orthographic(float left, float right, float bottom, float top, float near, float far)
mat4f mat4f_orthographic(float left, float right, float bottom, float top, float znear, float zfar)
{
mat4f ret = mat4f_zero();

ret.m[0][3] = -(right + left) / (right - left);
ret.m[1][3] = -(top + bottom) / (top - bottom);
ret.m[2][3] = -(far + near) / (far - near);
ret.m[2][3] = -(zfar + znear) / (zfar - znear);
ret.m[0][0] = 2.0f / (right - left);
ret.m[1][1] = 2.0f / (top - bottom);
ret.m[2][2] = -2.0f / (far - near);
ret.m[2][2] = -2.0f / (zfar - znear);
ret.m[3][3] = 1.0f;

return ret;
Expand Down
2 changes: 1 addition & 1 deletion matrix.h
Expand Up @@ -38,7 +38,7 @@ mat4f mat4f_mult(mat4f a, mat4f b);
mat4f mat4f_rotate(float xRot, float yRot, float zRot);
mat4f mat4f_rotate(float angle, float x, float y, float z);
mat4f mat4f_translate(float x, float y, float z);
mat4f mat4f_orthographic(float left, float right, float bottom, float top, float near, float far);
mat4f mat4f_orthographic(float left, float right, float bottom, float top, float znear, float zfar);
mat4f mat4f_perspective(float fov, float aspect, float zNear, float zFar);
mat4f mat4f_camera_transform(vec3f target, vec3f up);
mat4f quat2mat(quatf quat);
Expand Down

0 comments on commit 1226e68

Please sign in to comment.