types

package
v0.0.0-...-63dc931 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pointf

type Pointf struct {
	X float32 `json:"x"`
	Y float32 `json:"y"`
}

func Point2f

func Point2f(p image.Point) Pointf

func Ptf

func Ptf(x, y float32) Pointf

func (Pointf) Add

func (p Pointf) Add(p2 Pointf) Pointf

func (Pointf) Div

func (p Pointf) Div(v float32) Pointf

func (Pointf) Len

func (p Pointf) Len() float64

func (Pointf) Mul

func (p Pointf) Mul(v float32) Pointf

func (Pointf) Normalize

func (p Pointf) Normalize() Pointf

func (Pointf) Point

func (p Pointf) Point() image.Point

func (Pointf) Pos

func (p Pointf) Pos() Pointf

func (Pointf) Sub

func (p Pointf) Sub(p2 Pointf) Pointf

type RGB

type RGB struct {
	R byte `json:"r"`
	G byte `json:"g"`
	B byte `json:"b"`
}

type Rectf

type Rectf struct {
	Min Pointf
	Max Pointf
}

func RectFromPointsf

func RectFromPointsf(p1, p2 Pointf) Rectf

func (Rectf) Canon

func (r Rectf) Canon() Rectf

func (*Rectf) IsEmpty

func (r *Rectf) IsEmpty() bool

Jump to

Keyboard shortcuts

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