convert angles to radians
This commit is contained in:
parent
513599d855
commit
64b76bd085
@ -92,8 +92,8 @@ void guMatrixRotate(guMatrix4x4 *m, GLfloat angle,
|
||||
ly /= scale;
|
||||
lz /= scale;
|
||||
}
|
||||
GLfloat c = cos(angle);
|
||||
GLfloat s = sin(angle);
|
||||
GLfloat c = cos(M_PI * angle / 180.0);
|
||||
GLfloat s = sin(M_PI * angle / 180.0);
|
||||
guMatrix4x4 mult;
|
||||
GLfloat oc = 1 - c;
|
||||
mult[0][0] = lx * lx * oc + c;
|
||||
@ -154,7 +154,7 @@ void guPerspective(guMatrix4x4 *m, GLfloat fovy, GLfloat aspect,
|
||||
mult[i][j] = 0.0;
|
||||
}
|
||||
}
|
||||
GLfloat f = 1.0 / tan(fovy / 2.0);
|
||||
GLfloat f = 1.0 / tan(M_PI * fovy / 360.0);
|
||||
GLfloat nf = near - far;
|
||||
mult[0][0] = f / aspect;
|
||||
mult[1][1] = f;
|
||||
|
Loading…
x
Reference in New Issue
Block a user