d2geom

package
v0.0.0-...-7f92c57 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 0 Imported by: 1

Documentation

Overview

Package d2geom is a utility package for anything related to geometry

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

type Point struct {
	X int
	Y int
}

Point represents a point

type Pointf

type Pointf struct {
	X float64
	Y float64
}

Pointf represents a point with float coordinates

type Rectangle

type Rectangle struct {
	Left   int
	Top    int
	Width  int
	Height int
}

Rectangle represents a rectangle

func (*Rectangle) Bottom

func (v *Rectangle) Bottom() int

Bottom returns y of the bottom point of the rectangle

func (*Rectangle) IsInRect

func (v *Rectangle) IsInRect(x, y int) bool

IsInRect returns if the given position is in the rectangle or not

func (*Rectangle) Right

func (v *Rectangle) Right() int

Right returns x of the right point of the rectangle

type Size

type Size struct {
	Width, Height int
}

Size represents a size

Jump to

Keyboard shortcuts

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