util

package
v0.0.0-...-117e4bf Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gamepoint

type Gamepoint struct {
	World  Zpoint
	Camera Zpoint
	Screen Screenpoint
}

type Screenpoint

type Screenpoint struct {
	X         float64
	Y         float64
	CielingY  float64
	BridgeTop float64
	W         float64
	Scale     float64
}

type Util

type Util struct {
}

func NewUtil

func NewUtil() *Util

func (*Util) Accelerate

func (u *Util) Accelerate(v, accel float64, dt float64) float64

func (*Util) EaseIn

func (u *Util) EaseIn(a, b, percent float64) float64

func (*Util) EaseInOut

func (u *Util) EaseInOut(a, b, percent float64) float64

func (*Util) EaseOut

func (u *Util) EaseOut(a, b, percent float64) float64

func (*Util) Increase

func (u *Util) Increase(start float64, increment float64, max float64) float64

func (*Util) Interpolate

func (u *Util) Interpolate(a, b, percent float64) float64

func (*Util) Limit

func (u *Util) Limit(value, min, max float64) float64

func (*Util) ParseHexColor

func (u *Util) ParseHexColor(hex string) (int, int, int, int)

func (*Util) PercentRemaining

func (u *Util) PercentRemaining(n, total int) float64

func (*Util) Project

func (u *Util) Project(gp *Gamepoint, cameraX, cameraY, cameraZ, cameraDepth, width, height, roadWidth float64)

type Zpoint

type Zpoint struct {
	X float64
	Y float64
	Z float64
}

Jump to

Keyboard shortcuts

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