Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is a random source using xorshift64+ algorithm.
Example ¶
package main
import (
"fmt"
"math/rand"
"github.com/shogo82148/randsrc/xorshift64p"
)
func main() {
src := xorshift64p.New(1, 2)
r := rand.New(src)
for i := 0; i < 10; i++ {
fmt.Println(r.Int63())
}
}
Output: 4194338 16777346 35184388868193 105553133574178 140754683045986 180388662090149 144269188536929133 432754636450716727 577675240925375637 595796291516972138
Click to show internal directories.
Click to hide internal directories.