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:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to