ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
(Generate patch)

Comparing deliantra/server/include/util.h (file contents):
Revision 1.91 by root, Thu Oct 15 21:09:32 2009 UTC vs.
Revision 1.92 by root, Tue Oct 20 05:57:08 2009 UTC

214isqrt (int n) 214isqrt (int n)
215{ 215{
216 return (int)sqrtf ((float)n); 216 return (int)sqrtf ((float)n);
217} 217}
218 218
219// this is kind of like the ^^ operator, if it would exist, without sequence point.
220// more handy than it looks like, due to the implicit !! done on its arguments
221inline bool
222logical_xor (bool a, bool b)
223{
224 return a != b;
225}
226
227inline bool
228logical_implies (bool a, bool b)
229{
230 return a <= b;
231}
232
219// this is only twice as fast as naive sqrtf (dx*dy+dy*dy) 233// this is only twice as fast as naive sqrtf (dx*dy+dy*dy)
220#if 0 234#if 0
221// and has a max. error of 6 in the range -100..+100. 235// and has a max. error of 6 in the range -100..+100.
222#else 236#else
223// and has a max. error of 9 in the range -100..+100. 237// and has a max. error of 9 in the range -100..+100.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines