util

package
v0.0.0-...-8a8a644 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clamp

func Clamp(v, min, max float64) float64

clamp limits v to [min, max]

func GetRandomPositionInView

func GetRandomPositionInView(posX, camY float64) (float64, float64)

function to get a random position within the given position range

func GetSubImage

func GetSubImage(img *ebiten.Image, subRect image.Rectangle) *ebiten.Image

GetSubImage returns the sub-image corresponding to the given frameRect

Types

This section is empty.

Jump to

Keyboard shortcuts

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