helpers

package
v0.0.0-...-45548fe Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstrainFloat64

func ConstrainFloat64(n, low, high float64) float64

func ConstrainUInt8

func ConstrainUInt8(n, low, high uint8) uint8

func PosInBounds

func PosInBounds(pos pixel.Vec, rect pixel.Rect) bool

func RandFloatInRange

func RandFloatInRange(min, max float64) float64

RandFloatInRange returns a random float64 between min and max

func RandIntInRange

func RandIntInRange(min, max int) int

RandIntInRange returns a random int between min and max

func ReRange

func ReRange(value, aMin, aMax, bMin, bMax float64) float64

ReRange maps a value from one range to another

Types

This section is empty.

Jump to

Keyboard shortcuts

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