turtleutil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Water  color.RGBA = color.RGBA{0x23, 0x89, 0xDA, 0xFF} // 2389DA
	Black  color.RGBA = color.RGBA{0x00, 0x00, 0x00, 0xFF}
	White  color.RGBA = color.RGBA{0xFF, 0xFF, 0xFF, 0xFF}
	Red    color.RGBA = color.RGBA{0xFF, 0x00, 0x00, 0xFF}
	Green  color.RGBA = color.RGBA{0x00, 0xFF, 0x00, 0xFF}
	Blue   color.RGBA = color.RGBA{0x00, 0x00, 0xFF, 0xFF}
	Purple color.RGBA = color.RGBA{0xFF, 0x00, 0xFF, 0xFF}
)

Functions

func Lerp

func Lerp(a, b, ratio float64) float64

The ratio is capped between 0 and 1

func LerpColor

func LerpColor(a, b color.RGBA, ratio float64) color.RGBA

Creates a color between the given a and b. 0 means a is given, 1 means b is given, .5 is a color half way between. The ratio is capped between 0 and 1 Currently the function floors the number instead of rounding to nearest.

func LerpUint8

func LerpUint8(a, b uint8, ratio float64) uint8

The ratio is capped between 0 and 1 Currently the function floors the number instead of rounding to nearest.

Types

This section is empty.

Jump to

Keyboard shortcuts

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