def u64.of

bend-kit-bytes@0.3.3.0 · bytes.bend:236

import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import Base
import bend-kit-int@0.2.0.0/int.bend as Int

236# The U64 whose words, in byte order, are x then y.
237def u64.of(be: Bool, +x: U32, +y: U32) -> Int.U64:
238  match be:
239    case True{}:
240      Int.U64.or(Int.U64.shl(Int.U64.from_u32(x), 32n), Int.U64.from_u32(y))
241    case False{}:
242      Int.U64.or(Int.U64.shl(Int.U64.from_u32(y), 32n), Int.U64.from_u32(x))

Uses (6)

Used by (1)