utility

package module
v0.0.0-...-32a6c25 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2018 License: Apache-2.0 Imports: 1 Imported by: 1

README

Utility

A series of utility functions for the procedural generation projects.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ItemInCollection

func ItemInCollection(item string, collection []string) bool

ItemInCollection checks to see if a string is in an array of strings

func Min

func Min(a, b int) int

Min returns the smaller of two integers

func RandomItem

func RandomItem(items []string) string

RandomItem returns a random string from an array of strings

func RandomItemFromThresholdMap

func RandomItemFromThresholdMap(items map[string]int) string

RandomItemFromThresholdMap returns a random weighted string

Types

This section is empty.

Jump to

Keyboard shortcuts

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