Skip to content

Instantly share code, notes, and snippets.

@moorthy-g
Created September 17, 2018 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moorthy-g/b1d148b7e885f97ca1d24c75fd118fe8 to your computer and use it in GitHub Desktop.
Save moorthy-g/b1d148b7e885f97ca1d24c75fd118fe8 to your computer and use it in GitHub Desktop.
//Merge Low 30bits and other high bits
//Reverse of https://gist.github.com/moorthy-g/bb3716303384365bce7b98b67af14fd1
function mergeBits30(splitBits) {
let [highBits, lowBits] = splitBits;
return (highBits & 0x3fffff) * 0x40000000 + (lowBits & 0x3fffffff);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment