commit 3f0353636cf02eef23e3966d864c2cb79da1decf
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Wed Oct 1 19:38:37 2008 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Wed Oct 1 19:38:37 2008 +0000
Remove duplicate SlopeDiv function.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1320
---
src/hexen/r_main.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/src/hexen/r_main.c b/src/hexen/r_main.c
index 1ee0168e..2427f5f4 100644
--- a/src/hexen/r_main.c
+++ b/src/hexen/r_main.c
@@ -203,27 +203,8 @@ int R_PointOnSegSide(fixed_t x, fixed_t y, seg_t * line)
===============================================================================
*/
-// to get a global angle from cartesian coordinates, the coordinates are
-// flipped until they are in the first octant of the coordinate system, then
-// the y (<=x) is scaled and divided by x to get a tangent (slope) value
-// which is looked up in the tantoangle[] table. The +1 size is to handle
-// the case when x==y without additional checking.
-#define SLOPERANGE 2048
-#define SLOPEBITS 11
#define DBITS (FRACBITS-SLOPEBITS)
-
-// int tantoangle[SLOPERANGE+1];
-
-int SlopeDiv(unsigned num, unsigned den)
-{
- unsigned ans;
- if (den < 512)
- return SLOPERANGE;
- ans = (num << 3) / (den >> 8);
- return ans <= SLOPERANGE ? ans : SLOPERANGE;
-}
-
angle_t R_PointToAngle(fixed_t x, fixed_t y)
{
x -= viewx;