rectutil

package
v0.0.0-...-e7326f8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeBoundingBox

func ComputeBoundingBox(x, y, w, h, d float64) (A, B *vector2.Vector2)

Computes the bounding box of rotated rectangle. x, y - coordinates of the rectangle w, h - width and height of the rectangle d - angle in degress

func IsPointOnRect

func IsPointOnRect(
	point *vector2.Vector2,
	rectStart *vector2.Vector2,
	rectEnd *vector2.Vector2) bool

Returns true if point is on rect

func IsRectCollidesRect

func IsRectCollidesRect(
	rect1Start *vector2.Vector2,
	rect1End *vector2.Vector2,
	rect2Start *vector2.Vector2,
	rect2End *vector2.Vector2,
) bool

Returns true if rect is collides with rect

Types

This section is empty.

Jump to

Keyboard shortcuts

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