Follow-up Comment #1, patch #1222 (project freeciv):

> +     city_map_info[i].radius = i;
> +     city_map_info[i].radius_sq = i * i + 1;

So the radius_sq is not really square of radius but one bigger. Why?
Regardless of the reason this is too confusing this way.

I don't see much sense in precomputing radius_sq values to city_map_info and
then using accessor function to get it. Any performance gain from having it
precomputed is lost in function call. Maybe define city_map_radius_sq as
macro for readability - you don't need to scatter i*i+1 everywhere.


    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1222>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to