OCA_Backend/api/node_modules/wkx/lib/zigzag.js
2022-01-22 19:06:44 +05:30

9 lines
188 B
JavaScript

module.exports = {
encode: function (value) {
return (value << 1) ^ (value >> 31);
},
decode: function (value) {
return (value >> 1) ^ (-(value & 1));
}
};