helper

package
v0.0.0-...-f4fbe18 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: CC0-1.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chance

func Chance(percent float64) bool

func Checkerboard

func Checkerboard(w, h, cells int) image.Image

func GpuInfo

func GpuInfo() (gpu string)

func Image

func Image(fs embed.FS, filepath string) *ebiten.Image

func RangeFloat

func RangeFloat(min, max float64) float64

func Rect

func Rect(x, y, w, h int) image.Rectangle

Types

type Plot

type Plot struct {
	Values []float64
	Max    float64
	Bars   int
}

func NewPlot

func NewPlot(bars int, max float64) *Plot

func (*Plot) Draw

func (p *Plot) Draw(screen *ebiten.Image, x, y, w, h float64)

func (*Plot) Last

func (p *Plot) Last() float64

func (*Plot) Update

func (p *Plot) Update(value float64)

Jump to

Keyboard shortcuts

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