hex-world
    Preparing search index...

    Function riverEdgeFlow

    • The accumulated flow crossing a given edge of a cell: the flow of whichever cell is upstream of that edge. Because both cells sharing the edge resolve to the same upstream cell, they always agree — this is what keeps channel width continuous across cell (and chunk) borders.

      Falls back to the cell's own flow for edges without a paired upstream (sources, estuary mouths, dangling half-edges).

      Parameters

      • map: RiverFlowSource
      • flow: Map<number, number>
      • col: number
      • row: number
      • edgeIndex: number
      • edgeDirs: readonly number[]

      Returns number