   raycasting routine
  I use the below routine to check for line-of-sight to determine whether tiles, sprites, and subdivisions of tiles should be lit or not in my 2d game. Is there a faster alternative to my method?BOOL LOS(NSPoint src, NSPoint dst, int accuracy){   BOOL is_done = FALSE;int counter = 0;float angle = get_angle(src, dst);NSPoint tmp = src;NSPoint delta = castray(src,angle,accuracy);float dx = delta.x - src.x;float dy = delta.y - src.y; do{counter++;if (detect_ray_collision(tmp)){return FALSE;}tmp.x += dx;tmp.y += dy;if(get_dist(tmp, dst) < accuracy/2 || counter > MAX_COUNTER)  {is_done = TRUE;   }}while ( !is_done);  return TRUE;}
  Since you didn't include the support functions in your post, it's a little hard to tell what's going on in the code. Also, it would be easier to read if you edited the post to use [source] tags.   