tools

package
v0.0.0-...-bb68497 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorInversion

func ColorInversion(c color.RGBA64) color.RGBA64

ColorInversion inverse a color

func ColorMean

func ColorMean(percentage int, min, max *color.RGBA64) color.RGBA64

ColorMean do the mean between two colors for a given percentage

func ColorsInversion

func ColorsInversion(colors []color.RGBA64) []color.RGBA64

ColorsInversion inverse a array of colors

Types

type ColorGenerator

type ColorGenerator struct {
	// contains filtered or unexported fields
}

ColorGenerator is a color generator

func NewColorGenerator

func NewColorGenerator(seed int, maxColors []color.RGBA64) ColorGenerator

NewColorGenerator create a color generator

func (*ColorGenerator) NextColor

func (g *ColorGenerator) NextColor() color.RGBA64

NextColor returns the next color of the generator

type NumberGenerator

type NumberGenerator struct {
	// contains filtered or unexported fields
}

NumberGenerator is a predictable number generator

func NewNumberGenerator

func NewNumberGenerator(seed int, min int, max int) NumberGenerator

NewNumberGenerator creates a new number generator with a specific seed

func (*NumberGenerator) NextPositive

func (n *NumberGenerator) NextPositive() int

NextPositive returns the next positive value of the generator

Jump to

Keyboard shortcuts

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