You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest replace i8Portable implementation which currently looks like this:
functioncheckBitOnByte(bitPosition,byte){return(byte&(1<<bitPosition))!=0;}functioni8Portable(param){// JS ints are all i32, therefore, get the sign bit, and then convert accordingly// Example: https://blog.michaelyin.info/convert-8bit-byte-to-signed-int/letresponse=param;if(checkBitOnByte(7,response)){response=(256-param)*-1;}returnresponse;}
And not handle this case for example:
i8Portable(260)// return 260 but should 4
To this:
functioni8Portable(param){returnparam<<24>>24;}
The text was updated successfully, but these errors were encountered:
MaxGraey
changed the title
i8Portable is not handle all cases and overcompleacated
i8Portable is not handle all cases and overcomplicated
Jan 3, 2019
* Implemented all changes from #230 and #221
* Fixed off by one mentioned in #216
* Wrapped modulo in i32Portable as mentioned in #216
* issue #207, Allowed making closure builds for debugging, and then tried
to match its inlining
* Removed the legacy api
* Updated the package-lock for the branch
I suggest replace
i8Portable
implementation which currently looks like this:And not handle this case for example:
To this:
The text was updated successfully, but these errors were encountered: