Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3450) square_iterate and unreal positions

[Freeciv-Dev] (PR#3450) square_iterate and unreal positions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3450) square_iterate and unreal positions
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Feb 2003 01:07:07 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[rfalke - Tue Feb 25 18:18:15 2003]:

> On Tue, Feb 25, 2003 at 05:39:08AM -0800, Jason Short wrote:
> > Raimar Falke wrote:
> > > On Mon, Feb 24, 2003 at 05:09:25PM -0800, rwetmore@xxxxxxxxxxxx 

> > > So I argue that if you use square_iterate on a non-real map position
> > > you get random behavior. You may now argue that this randomness has a
> > > pattern and that square_iterate was coded to produce this pattern.
> > 
> > Random?  Surely square_iterate(-1,-1,2,2) isn't any more "random" than 
> > square_iterate(0,0,2,2).  In both cases some unreal positions get 
> > skipped and some non-normal ones get normalized.
> It isn't about (0,0) vs (-1, -1) but (-1, -1) vs (-10, -10).
> It is just luck that you get a real map position if you start with a
> non-real one.

But the non-real positions will be skipped over, just like they're
supposed to be.  If you start with (-10,-10) and end up skipping every
position, then your loop will have worked correctly.  Where's the luck
in that?

> It should make the normalization before. It the code wants to pass
> non-real map positions in it has to use another macro.

I have already proposed this, and you were against it also.  Yet some
resolution is needed, and it should _not_ be to just say the caller has
to write a local loop.


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