Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] more small directional cleanups
Home

[Freeciv-Dev] Re: [PATCH] more small directional cleanups

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Trent Piepho <xyzzy@xxxxxxxxxxxxx>, Freeciv-dev mailing list <freeciv-dev@xxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] more small directional cleanups
From: Jason Dorje Short <jshort@xxxxxxxxxxxxx>
Date: Tue, 21 Aug 2001 19:38:31 -0400

Raimar Falke wrote:
> 
> On Tue, Aug 21, 2001 at 12:33:55PM -0700, Trent Piepho wrote:
> > If you think normal isn't clear enough, because it can mean lots of things,
> > then pick another proper adjective.  Like "canonical".  Or "proper".  But 
> > not
> > a past particple like "normalized"!
> 
> What do you think about "is_standard_position", "is_true_position" and
> "is_normal_format_position"?

I find those _very_ confusing.  In fact, I don't even know what they
mean.

"Normal" and "normalized" are practically synonymous.  "Normalized"
means "something which has been made normal".  This implies that it has
undergone a process of "normalization", but that's insubstantial since
we're only talking about the current state of the coordinates.

Let's also be clear here: "normal" does not mean "plain and ordinary" as
it does in common English, but "possessing the desired properties" (or
perhaps "in the form that we want it to be in") as it does in
mathematical/scientific speech (normal force, normal vector, normal
distribution, normal map position).

So, it's really a question of symantics versus clarity.  IMO,
is_normal_map_pos is easier to read and understand for technical people,
however, nontechnical people are more likely to confuse its meaning. 
is_normalized_map_pos isn't as pretty but implies the technical
definition ("normalized" is used very little in common speech).

I'd like to restate that normalcy should be *dependent* on realness. 
Anything that is "real" can be "normalized".  However there are
singularities that may not be normalized - in vectors the 0 vector can't
be normalized; in FreeCiv any unreal map position cannot (necessarily)
be normalized.  (Although current topologies cause wrapping and realness
to be independent, we should not make any assumptions about unreal
coordinates).

Thus I again propose the following functions:
        normalize_map_pos
        is_normal(ized)_map_pos
        is_real_map_pos

I can't decide whether "map_pos" or "tile" is better, either, but we
should pick just one and stick to it.  Again "tile" is (IMO) more
readable while "map_pos" (possibly) more correct.  Finally,
ensure_normal_map_pos would be a fine add-on function (although IMO
assert(is_normal_map_pos()) is more legible).

jason


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