Last active
June 25, 2016 01:11
-
-
Save rom1504/967218116b3289906b288e5859c8e0de to your computer and use it in GitHub Desktop.
position in chunk 1.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cursorInBits=getArrayPosition(pos)*this.bitsPerBlock; | |
const firstLongPosition=Math.floor(cursorInBits/64); | |
const shouldBePosition=(64-this.bitsPerBlock)-cursorInBits%64; | |
const positionInFirstLong=Math.max(shouldBePosition,0); | |
if(shouldBePosition<0) | |
{ | |
const lastLongPosition=firstLongPosition+1; | |
const positionInLastLong=64+shouldBePosition; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment