Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: topology RFC (again)
Home

[Freeciv-Dev] Re: topology RFC (again)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: topology RFC (again)
From: Jason Dorje Short <vze2zq63@xxxxxxxxxxx>
Date: Sun, 28 Oct 2001 21:35:46 -0500
Reply-to: jdorje@xxxxxxxxxxxx

"Ross W. Wetmore" wrote:
> 

> >- nearest_real_pos(&x, &y) adjusts x and y to be one of the nearest
> >positions to (x, y) that is contained in N.  (NOTE that it is misnamed,
> >it should be nearest_normal_pos.)  Since distance is poorly defined and
> >there may be more than one position with equal distance, the new set of
> >coordinates is not well-defined.  Thus you should not assume anything
> >about this function.
> 
> rename misnamed again, try: nearest_normal_map_pos()
> 
> > It is definitely needed to keep the same behavior
> >in the user interface, unfortunately; in fact right now it is the same
> >as x=map_adjust_x(x),y=map_adjust_y(y) which is still used in many
> >places (mostly incorrectly).  This should be renamed nearest_real_map_pos.

Oh, I understand your point now.

There is some confusion in my mind as to whether the current
nearest_real_pos is intended to return only normal (N(0, 0))
coordinates, or only does this as a side effect.  Clearly the name
should be kept consistent with the behavior (and vice versa); the code
currently does assume that the returned position will be normal so
that's how it should be named.

jason


[Prev in Thread] Current Thread [Next in Thread]