[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

7208: [MUD-Dev] Re: X, Y & Z.

[Full Header] [Plain Text]
From: Ben Greear <greear@cyberhighway.net>
Newsgroups: nu.kanga.list.mud-dev
Date: Fri, 11 Sep 1998 15:49:22 -0700 (MST)
References: [1]
Organization: Kanga.Nu
On Fri, 11 Sep 1998, Scott Cade wrote:

> Coo... my first post after being a lurker here for quite a while :)
> 
> I'm after a formula for producing a single unique number, given any
> combination
> of 3 large other numbers (all unsigned long integers) - those being X,Y & Z
> grid
> coordinates. I can do this easily using just X & Y, and given defined
> WORLD_WIDTH
> & WORLD_HEIGHT values, but the extra Z coordinate has got me stumped.
> 
> Apologies if i've not explained this very well, and thanks in advance for
> any
> suggestions if I have. :)

I unless I mis-understand, you cannot do this.  You must have as many bits
(information) in your result as in your input(s) if you want a one-to-one
mapping.  

I don't think that is what you want however, so please re-word your
question..let us know what you are really trying to do.

Ben

> 
> 
> Scott Cade.
> 
> -- 
> MUD-Dev: Advancing an unrealised future.
> 


Ben Greear (greear@cyberhighway.net)  http://www.primenet.com/~greear 
Author of ScryMUD:  mud.primenet.com 4444
http://www.primenet.com/~greear/ScryMUD/scry.html