basics

package
v0.0.0-...-c30d63a Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AngleFromFVecToFVec

func AngleFromFVecToFVec(v1, v2 Vector2f) float64

func DrawCircle

func DrawCircle(dst *ebiten.Image, px, py, ox, oy, r float64, clr color.Color)

func FloatClamp

func FloatClamp(value, min, max float64) float64

func FloatDistance

func FloatDistance(v1, v2 Vector2f) float64

func FloatLerp

func FloatLerp(a, b, t float64) float64

func FloatMagnitude

func FloatMagnitude(v1 Vector2f) float64

Types

type FloatRect

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

type FloatRectUI

type FloatRectUI struct {
	Name   string
	X      float64
	Y      float64
	Width  float64
	Height float64
}

func (*FloatRectUI) IsClicked

func (f *FloatRectUI) IsClicked(positionOfClick Vector2f) bool

func (*FloatRectUI) IsHoveredOver

func (f *FloatRectUI) IsHoveredOver(positionOfMouse Vector2f) bool

type IntRect

type IntRect struct {
	X      int
	Y      int
	Width  int
	Height int
}

type Rect

type Rect[T interface{}] struct {
	X      T
	Y      T
	Width  T
	Height T
}

type Vector2

type Vector2[T interface{}] struct {
	X T
	Y T
}

type Vector2f

type Vector2f struct {
	X float64
	Y float64
}

Floats

func FloatNormalise

func FloatNormalise(v Vector2f) Vector2f

func FloatRotAroundPoint

func FloatRotAroundPoint(point, center Vector2f, angle float64) Vector2f

func Vec2FLerp

func Vec2FLerp(v1, v2 Vector2f, t float64) Vector2f

type Vector2i

type Vector2i struct {
	X int
	Y int
}

Ints

type Vector3f

type Vector3f struct {
	X float64
	Y float64
	Z float64
}

type Vector3i

type Vector3i struct {
	X int
	Y int
	Z int
}

Jump to

Keyboard shortcuts

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