github.com/enetx/g@v1.0.80/examples/ints.go (about)

     1  package main
     2  
     3  import "github.com/enetx/g"
     4  
     5  func main() {
     6  	g.NewInt(100).Random().Print()
     7  
     8  	g.NewInt(-10).RandomRange(-5).Print()
     9  	g.NewInt(-10).RandomRange(5).Print()
    10  
    11  	g.NewInt(11).Max(10, 32, 11, 33, 908).Print()
    12  	g.NewInt(11).Min(-1, 32, 11, 33, 908).Print()
    13  
    14  	g.NewInt(97).ToBinary().Print()
    15  	g.NewInt('a').ToBinary().Print()
    16  	g.NewInt(byte('a')).ToBinary().Print()
    17  }