math

package
v0.0.0-...-f4b0e07 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DegToRad = math.Pi / 180
	RadToDeg = 180 / math.Pi
)

Variables

This section is empty.

Functions

func CalcCenterOfGravity

func CalcCenterOfGravity(min orb.Point, max orb.Point) orb.Point

func CalculateDirection

func CalculateDirection(p1, p2 orb.Point) int

func TouchesOrIntersects

func TouchesOrIntersects(b1, b2 Rect) bool

TouchesOrIntersects prüft, ob sich zwei Boxen berühren oder überschneiden.

Types

type Circle

type Circle struct {
	orb.Point
	Radius float64
	Rect
}

func NewCircle

func NewCircle(x, y, r float64) Circle

type Rect

type Rect [2]orb.Point

func NewRect

func NewRect(x, y, w, h float64) Rect

func (Rect) Size

func (r Rect) Size() (w, h float32)

func (Rect) ToBox

func (r Rect) ToBox() (min, max [2]float64)

Jump to

Keyboard shortcuts

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