Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Map coordinate cleanups.
Home

[Freeciv-Dev] Re: Map coordinate cleanups.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jason Dorje Short <jshort@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Map coordinate cleanups.
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sat, 18 Aug 2001 12:09:07 -0400

At 02:05 AM 01/08/18 -0400, Jason Dorje Short wrote:
>"Ross W. Wetmore" wrote:
>>
>
><snip>
>
>Nicely phrased.
>
>> There is perhaps a need to determine if real coordinates are normalized
>> and return that value without actually munging the values. But it is
>> rare. Hence is_normal<something> is a useful function, but not really
>> needed.
>
>I disagree with this; is_normal_<something> (or
>is_normalized_<something>) are very useful functions.  Ideally,
>non-normalized (non-(wrapped and real)) coordinates should never be
>passed around; coordinates should be created normalized, have wrapping
>and realness checked every time they're changed, and always be passed
>around normalized.  In this situation, there should be lots of
>assert(is_normal_<something>(x, y)) lines sitting around in the code.
>
>It is definitely needed.

Agreed, I stand corrected. 

The asserts are definitely useful and (currently) needed :-).

>jason

Cheers,
RossW




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