engine

package
v0.0.0-...-a9b3afa Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clamp

func Clamp(value, min, max float64) float64

func RenderedStringLength

func RenderedStringLength(str string, fnt font.Face) (int, int)

RenderedStringLength measures the size of the rendered string using the given font face. It returns the width and height as integers.

Types

type Rect

type Rect struct {
	X      float64
	Y      float64
	Width  float64
	Height float64
}

func NewRect

func NewRect(x, y, width, height float64) Rect

func (Rect) Intersects

func (r Rect) Intersects(other Rect) bool

func (Rect) MaxX

func (r Rect) MaxX() float64

func (Rect) MaxY

func (r Rect) MaxY() float64

func (Rect) ToImageRectangle

func (r Rect) ToImageRectangle() image.Rectangle

type Timer

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

func NewTimer

func NewTimer(d time.Duration) *Timer

func (*Timer) IsReady

func (t *Timer) IsReady() bool

func (*Timer) PercentDone

func (t *Timer) PercentDone() float64

func (*Timer) Reset

func (t *Timer) Reset()

func (*Timer) Update

func (t *Timer) Update()

Jump to

Keyboard shortcuts

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