Skip to content

Commit

Permalink
Make tilray init() handle large numbers properly
Browse files Browse the repository at this point in the history
  • Loading branch information
vidarsk committed Mar 11, 2014
1 parent 9a94995 commit d6509f7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tileray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ void tileray::init (int adir)
deltax = 0;
deltay = 0;
leftover = 0;
direction = adir;
direction = adir % 360;
if (direction <0)
direction += 360;
if (direction >= 360)
direction -= 360;
last_dx = 0;
last_dy = 0;
deltax = abs((int) (cos ((float) direction * M_PI / 180.0) * 100));
Expand Down

0 comments on commit d6509f7

Please sign in to comment.