API/api.medcify.app/node_modules/wkx/lib/zigzag.js

9 lines
188 B
JavaScript
Raw Normal View History

2022-09-26 06:11:44 +00:00
module.exports = {
encode: function (value) {
return (value << 1) ^ (value >> 31);
},
decode: function (value) {
return (value >> 1) ^ (-(value & 1));
}
};