[MUD-Dev] Re: X, Y & Z.
Ben Greear
greear at cyberhighway.net
Fri Sep 11 15:49:22 CEST 1998
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 at cyberhighway.net) http://www.primenet.com/~greear
Author of ScryMUD: mud.primenet.com 4444
http://www.primenet.com/~greear/ScryMUD/scry.html
More information about the mud-dev-archive
mailing list