Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)
Home

[Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Sun, 11 Nov 2001 21:12:59 +0000

On Sun, 11 Nov 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> On Thu, Nov 01, 2001 at 06:26:48AM -0800,
> jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
>> This patch introduces a new topology function,
>> base_real_map_distance().  It performs a similar function to
>> real_map_distance, but also finds a distance vector from the source
>> to the destination coordinate pair.  It also replaces xdist and
>> ydist.
>> 
>> A function like this is absolutely essential for iso-rectangular
>> topologies.  xdist() and ydist() will not work because you cannot
>> find the distance along one coordinate axis independently of the
>> other.
> 
> I changed it a bit. Now real_map_distance, sq_map_distance and
> map_distance follow all the same scheme.
> 
> Comments?

I already have a slightly more comprehensive fix in my local tree.
The reason I haven't taken it out in puclic yet is that currently it
is easy to produce a unique displacement vector that minimises
real_map_distance(), sq_map_distance() and map_distance().  The reason
is that you can minimise ABS(dx) and ABS(dy) independently.  On an
isometric map this is not so obvious.

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
I guess you guys got BIG MUSCLES from doing too much STUDYING!


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