Unpacking packed int
I came up with these methods to pack and unpack ints:
However when I unpack the packed int I get an unepxected result.
For example if I pack (3, 2) then unpack it I get (131072, 3)
8 Replies
ā
This post has been reserved for your question.
Hey @špothicon! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
that's because the unpack method doesn't... unpack that
if you want to revert the
<< 16
, you'd need >> 16
i do have a >> 16
and to revert the
|
/get the second part back, you'd need & 0xFFFF
wait i got it
thanks
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@465515365108154380>.