Home / Function/ nextInt() — bun Function Reference

nextInt() — bun Function Reference

Architecture documentation for the nextInt() function in realworld_stream.mjs from the bun codebase.

Entity Profile

Dependency Diagram

graph TD
  d467d310_e883_6020_8ffb_fc378ed6c44d["nextInt()"]
  4cb7c470_0a54_e6de_e803_1a8c65182639["nextRange()"]
  4cb7c470_0a54_e6de_e803_1a8c65182639 -->|calls| d467d310_e883_6020_8ffb_fc378ed6c44d
  style d467d310_e883_6020_8ffb_fc378ed6c44d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

bench/emitter/realworld_stream.mjs lines 6–12

function nextInt() {
  const m = 0x80000000; // 2**31;
  const a = 1103515245;
  const c = 12345;
  rngState = (a * rngState + c) % m;
  return rngState;
}

Subdomains

Called By

Frequently Asked Questions

What does nextInt() do?
nextInt() is a function in the bun codebase.
What calls nextInt()?
nextInt() is called by 1 function(s): nextRange.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free