p_maputl.c
/*
===================
=
= P_AproxDistance
=
= Gives an estimation of distance (not exact)
=
===================
*/
P_AproxDistance
Gives an estimation of distance (not exact)
P_AproxDistance Gives an estimation of distance ( not exact )
fixed_t P_AproxDistance (fixed_t dx, fixed_t dy)
{
	dx = D_abs(dx);
	dy = D_abs(dy);
	if (dx < dy)
		return dx+dy-(dx>>1);
	return dx+dy-(dy>>1);
}
fixed_t P_AproxDistance ( fixed_t dx , fixed_t dy ) { dx = D_abs ( dx ) ; dy = D_abs ( dy ) ; if ( dx < dy ) return dx + dy - ( dx >> 1 ) ; return dx + dy - ( dy >> 1 ) ; }
P_AproxDistance
Gives an estimation of distance (not exact)
P_AproxDistance Gives an estimation of distance ( not exact )