geom

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEFAULT_SIZE = Vec2{
	R: 26,
	C: 80,
}

Functions

func AsUint16

func AsUint16(val int) uint16

func Clamp

func Clamp(value, min, max int) int

func Max

func Max(first int, second int) int

Max returns the largest integer

func Max16

func Max16(first int16, second int16) int16

Max16 returns the largest integer

func Max32

func Max32(first int32, second int32) int32

Max32 returns the largest 32-bit integer

func Min

func Min(first int, second int) int

Min returns the smallest integer

Types

type Rect

type Rect struct {
	// row (y)
	R int
	// column (x)
	C int
	// height (y)
	H int
	// width (x)
	W int
}

func (Rect) Position

func (r Rect) Position() Vec2

func (Rect) Size

func (r Rect) Size() Vec2

type Size

type Size = Vec2

type Vec2

type Vec2 struct {

	// row (y)
	R int
	// column (x)
	C int
	// contains filtered or unexported fields
}

func GetMaximum

func GetMaximum(a, b Vec2) Vec2

Find the largest rectangle that both rectangle `a` and `b` can fit.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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