math

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateInt

func GenerateInt(min, max int) int

GenerateInt generates a random integer

func GenerateIntSlice

func GenerateIntSlice(size, min, max int) []Generic

GenerateIntSlice generates an array with random integers

func GenerateString

func GenerateString(minLen, maxLen int) string

GenerateString generates a random string

func GenerateStringSlice

func GenerateStringSlice(size, minLen, maxLen int) []Generic

GenerateStringSlice generates an array with random strings

func IsIntIn

func IsIntIn(n int, list ...int) bool

IsIntIn checks if an integer is in a list of integers

func MaxFloat64

func MaxFloat64(nums ...float64) float64

MaxFloat64 returns maximum of float64 numbers

func MaxInt

func MaxInt(nums ...int) int

MaxInt returns maximum of int numbers

func MinFloat64

func MinFloat64(nums ...float64) float64

MinFloat64 returns minimun of float64 numbers

func MinInt

func MinInt(nums ...int) int

MinInt returns minimun of int numbers

func SeedWithNow

func SeedWithNow()

SeedWithNow seeds the random generator with time now

func Shuffle

func Shuffle(a []Generic)

Shuffle shuffles an array in O(n) time

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL