|
-
Oct 11th, 2008, 09:47 AM
#1
[RESOLVED] Splitting a Long into two Integers
There is a scheme already in place to combine two integer coordinates into one Long value. The integers range from -400 to 400, on both an x and y axis.
I do not know the logic driving how the coordinates are combined into one value. I assume it is a simple "high byte low byte" technique using a high integer and low integer. But I don't know how to do that.
Here are some actual values:
200,200 = 160801
-100,-100 = 400801
255,0 = 321056
0,255 = 116546
-127,127 = 218947
63,-63 = 371327
How do I go from coordinates to long and back again?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|