node-ejs-renderer/node_modules/wkx/lib/zigzag.js
2024-06-09 13:55:01 -04:00

9 lines
196 B
JavaScript

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