ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/object.C
(Generate patch)

Comparing deliantra/server/common/object.C (file contents):
Revision 1.330 by root, Sun Apr 18 14:01:33 2010 UTC vs.
Revision 1.331 by root, Sun Apr 18 14:04:50 2010 UTC

2230#if 1 // new algorithm 2230#if 1 // new algorithm
2231 // this works by putting x, y into 16 sectors, which 2231 // this works by putting x, y into 16 sectors, which
2232 // are not equal sized, but are a better approximation 2232 // are not equal sized, but are a better approximation
2233 // then the old algorithm, and then using a mapping 2233 // then the old algorithm, and then using a mapping
2234 // table to map it into a direction value. 2234 // table to map it into a direction value.
2235 // basically, it maps these comparisons to each bit
2236 // bit #3: x < 0
2237 // bit #2: y < 0
2238 // bit #1: x > y
2239 // bit #0: x > 2y
2235 2240
2236 static const uint8 dir[16] = { 2241 static const uint8 dir[16] = {
2237 4, 5, 4, 3, 2242 4, 5, 4, 3,
2238 2, 1, 2, 3, 2243 2, 1, 2, 3,
2239 6, 5, 6, 7, 2244 6, 5, 6, 7,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines