go-arbitrary/t_bool.go

8 lines
120 B
Go
Raw Normal View History

2015-01-29 08:45:50 +00:00
package arbitrary
// Bool returns an arbitrary bool.
func (arb T) Bool() bool {
return 0 == arb.randomness.Intn(2)
}