MCPcopy Index your code
hub / github.com/apache/echarts / encodePoint

Function encodePoint

test/data/map/encode.js:86–101  ·  view source on GitHub ↗
(val, prev)

Source from the content-addressed store, hash-verified

84}
85
86function encodePoint(val, prev){
87 // Quantization
88 val = quantize(val);
89 // var tmp = val;
90 // Delta
91 var delta = val - prev;
92
93 if (((delta << 1) ^ (delta >> 15)) + 64 === 8232) {
94 //WTF, 8232 will get syntax error in js code
95 delta--;
96 }
97 // ZigZag
98 delta = (delta << 1) ^ (delta >> 15);
99 // add offset and get unicode
100 return String.fromCharCode(delta + 64);
101}
102
103// Export for testing.
104if (typeof module !== 'undefined') {

Callers 1

encodeRingFunction · 0.85

Calls 1

quantizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…