MCPcopy
hub / github.com/Effect-TS/effect / add64

Function add64

packages/effect/src/Utils.ts:690–704  ·  view source on GitHub ↗
(
  out: Int32Array,
  aHi: number,
  aLo: number,
  bHi: number,
  bLo: number
)

Source from the content-addressed store, hash-verified

688
689// add two 64 bit numbers (given in parts), and store the result in `out`.
690function add64(
691 out: Int32Array,
692 aHi: number,
693 aLo: number,
694 bHi: number,
695 bLo: number
696): void {
697 let hi = (aHi + bHi) >>> 0
698 const lo = (aLo + bLo) >>> 0
699 if ((lo >>> 0) < (aLo >>> 0)) {
700 hi = (hi + 1) | 0
701 }
702 out[0] = hi
703 out[1] = lo
704}
705
706/**
707 * @since 3.0.6

Callers 2

constructorMethod · 0.85
_nextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected