Example #1
0
// Uniform returns a double precision floating point number
// uniformly distributed in the range [0,1). The range includes 0.0
// but excludes 1.0.
func (s *RngState) Uniform() float64 {
	return float64(C.gsl_rng_uniform(s.state))
}
Example #2
0
func UniformRandomFloat64(rng *RNG) float64 {
	return float64(C.gsl_rng_uniform(rng.g))
}
Example #3
0
File: rng.go Project: postfix/gsl-1
func Uniform(r *GslRng) float64 {
	return float64(C.gsl_rng_uniform((*C.gsl_rng)(unsafe.Pointer(r.Ptr()))))
}
Example #4
0
// Uniform returns a uniform random number between [0,1)
func (r *RNG) Uniform() float64 {
	return float64(C.gsl_rng_uniform(r.rng))
}