fix some errors and warnings for GCC 6

* do not use std::abs() because math.h includes one, that converts ints
  to double. Use own iabs(), which directly uses labs() instead.
* don't use the word "gamma" as name for variables
* don't use a homebrew round() function
This commit is contained in:
ac-stef
2016-02-27 22:50:06 +01:00
parent d107aa3cd6
commit 98d01d1f34
15 changed files with 33 additions and 38 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ void computeraytable(float vx, float vy, float fov)
{
float dist = (float)(fabs(sx-vx)+fabs(sy-vy));
if(firstquarter || dist > rdist[k]) rdist[k] = dist;
if(firstquarter) ndist[k] = max(abs(int(sx-vx)), abs(int(sy-vy)));
if(firstquarter) ndist[k] = max(iabs(sx-vx), iabs(sy-vy));
break;
}
}