How to use the MAX_SIGNED_VALUE function from long
Find comprehensive JavaScript long.MAX_SIGNED_VALUE code examples handpicked from public code repositorys.
GitHub: nlf/protobuf.js
83 84 85 86 87 88 89 90 91
expect(check.sint32).to.exist; expect(check.sint32).to.deep.equal(decoded); }); it('Can encode the max int64', function () { decoded = long.MAX_SIGNED_VALUE; encoded = client.encode('Test1', { int64: decoded }); expect(encoded).to.be.an.instanceof(Buffer); });
9
24
0
+ 11 other calls in file
GitHub: Fslink32/pmrv2
6386 6387 6388 6389 6390 6391 6392 6393 6394 6395
} else if (!unsigned && value <= -TWO_PWR_63_DBL) { return Long.MIN_SIGNED_VALUE; } else if (unsigned && value <= 0) { return Long.MIN_UNSIGNED_VALUE; } else if (!unsigned && value + 1 >= TWO_PWR_63_DBL) { return Long.MAX_SIGNED_VALUE; } else if (unsigned && value >= TWO_PWR_64_DBL) { return Long.MAX_UNSIGNED_VALUE; } else if (value < 0) { return Long.fromNumber(-value, false).negate();
0
0
1
+ 12 other calls in file
long.default is the most popular function in long (905 examples)