LCOV - code coverage report
Current view: top level - rawschema - randint.go Coverage Total Hit
Test: coverage.lcov Lines: 100.0 % 4 4
Test Date: 2026-11-19 00:25:22 Functions: - 0 0

            Line data    Source code
       1              : package rawschema
       2              : 
       3              : import "math/rand/v2"
       4              : 
       5              : // Roll は Base に 0 以上 Spread 未満の乱数を足す。Spread は1以上であること
       6              : func (r RandInt) Roll(rng *rand.Rand) int {
       7            1 :         return r.Base + rng.IntN(r.Spread)
       8            1 : }
       9              : 
      10              : // Mean は Roll の期待値を返す。Spread は1以上であること
      11              : func (r RandInt) Mean() float64 {
      12            1 :         return float64(r.Base) + float64(r.Spread-1)/2
      13            1 : }
        

Generated by: LCOV version 2.0-1