02-05-2014, 04:05 PM
(02-05-2014, 07:03 AM)FakeTruth Wrote: First of all AFAIK a long is 4 bytes (=32 bits) and you're shifting it 38 bits. This will most definitely result in overflow of the value.Which should i use then?
(02-05-2014, 07:03 AM)FakeTruth Wrote: Second -not really a problem- is the way you use LOGWARN. The log function takes a formatted string so you should write LOGWARN("%i", x); instead of the whole std::to_string() stuff.Okay, thanks.
(02-05-2014, 07:03 AM)FakeTruth Wrote: Last this totally blows my mind:This code is from the pre release protocol site (http://wiki.vg/Pre-release_protocol#Position)
The order in which the shifts occur is not clear at all. And you're shifting it with the same value to both sides which should result in no change? idk.. confusing.Code:long z2 = value << 38 >> 38;
(02-05-2014, 07:03 AM)FakeTruth Wrote: Do you know what you're doing or are you just trying something?With Protocol yes. But with the new Position data currently no.