v2ray hace 9 años
padre
commit
d89be624ce
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      common/dice/dice.go

+ 4 - 0
common/dice/dice.go

@@ -1,3 +1,6 @@
+// Package dice contains common functions to generate random number.
+// It also initialize math/rand with the time in seconds at launch time.
+
 package dice
 
 import (
@@ -5,6 +8,7 @@ import (
 	"time"
 )
 
+// Roll returns a non-negative number between 0 (inclusive) and n (exclusive).
 func Roll(n int) int {
 	if n == 1 {
 		return 0