ref: 3f0353636cf02eef23e3966d864c2cb79da1decf
parent: 89d95067fc7cde0e3f99f15cf5fc1e89381f9edf
author: Simon Howard <[email protected]>
date: Wed Oct 1 15:38:37 EDT 2008
Remove duplicate SlopeDiv function. Subversion-branch: /branches/raven-branch Subversion-revision: 1320
--- a/src/hexen/r_main.c
+++ b/src/hexen/r_main.c
@@ -203,26 +203,7 @@
===============================================================================
*/
-// 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)
{