Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int OctRad (int dx, dy)
- {
- int dMax = abs(dx);
- int dMin = abs(dy);
- if (dMin > dMax)
- swap(dMax,dMin);
- dMin >>= 1;
- return dmax + dMin - (dMin >> 2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement