Skip to content

Commit

Permalink
Use PI from utils instead of math.h, fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielOaks committed Dec 28, 2014
1 parent 351740a commit 0d65a6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/clouds.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ void getPIP(float *point, float *point_on_plane, float *ray_origin, float *ray_v

void update_clouds(float player_x, float player_y, float player_z, float rx, float rz, float fov) {
int i;
rx -= M_PI/2;
rx -= PI/2;

float rdx = player_x + (-40 * cos(rx));
float rdz = player_z + (-40 * sin(rx));

float llx = rx - (fov*(M_PI/180))/1.6;
float lrx = rx + (fov*(M_PI/180))/1.6;
float llx = rx - (fov*(PI/180))/1.6;
float lrx = rx + (fov*(PI/180))/1.6;

float ldx = player_x + (200 * cos(llx));
float ldz = player_z + (200 * sin(llx));
Expand Down

0 comments on commit 0d65a6b

Please sign in to comment.