CoastalCommitsPastes/server/node_modules/wkx/lib/zigzag.js

9 lines
196 B
JavaScript
Raw Normal View History

2022-03-06 16:46:59 -08:00
module.exports = {
encode: function (value) {
return (value << 1) ^ (value >> 31);
},
decode: function (value) {
return (value >> 1) ^ (-(value & 1));
}
};