MCPcopy Index your code
hub / github.com/plotly/plotly.js / nextafter

Function nextafter

stackgl_modules/index.js:32508–32540  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

32506module.exports = nextafter
32507
32508function nextafter(x, y) {
32509 if(isNaN(x) || isNaN(y)) {
32510 return NaN
32511 }
32512 if(x === y) {
32513 return x
32514 }
32515 if(x === 0) {
32516 if(y < 0) {
32517 return -SMALLEST_DENORM
32518 } else {
32519 return SMALLEST_DENORM
32520 }
32521 }
32522 var hi = doubleBits.hi(x)
32523 var lo = doubleBits.lo(x)
32524 if((y > x) === (x > 0)) {
32525 if(lo === UINT_MAX) {
32526 hi += 1
32527 lo = 0
32528 } else {
32529 lo += 1
32530 }
32531 } else {
32532 if(lo === 0) {
32533 lo = UINT_MAX
32534 hi -= 1
32535 } else {
32536 lo -= 1
32537 }
32538 }
32539 return doubleBits.pack(lo, hi)
32540}
32541
32542/***/ }),
32543

Callers 4

boundRatFunction · 0.85
boundEdgesFunction · 0.85
boundPointsFunction · 0.85
dedupPointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…