tp

package module
v0.0.0-...-4538b9e Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 5 Imported by: 1

README

tp

Documentation

Overview

Example
b := NewBB()
b.Add(Point{})
b.Add(Point{X: 1, Y: 1})
fmt.Fprintf(os.Stdout, "%s", b)
Output:

BorderBox
x={  0.0000,  1.0000}
y={  0.0000,  1.0000}

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BorderBox

type BorderBox struct {
	Xmin, Xmax float64
	Ymin, Ymax float64
	// contains filtered or unexported fields
}

BorderBox is struct of bordex box.

func NewBB

func NewBB() *BorderBox

New return prepared border box.

func (*BorderBox) Add

func (box *BorderBox) Add(p Point)

Add update border of border box.

func (*BorderBox) Center

func (box *BorderBox) Center() Point

Center return coordinate of center

func (*BorderBox) Inside

func (box *BorderBox) Inside(p Point) bool

Inside return true if point `p` is inside border box, but not on border. Or another case return false.

func (*BorderBox) String

func (box *BorderBox) String() string

String return string with border box coordinates

type Point

type Point struct {
	X, Y float64
}

Point store coordinates of point

func (Point) Equals

func (p Point) Equals(point Point) bool

TODO: use DEEP COMPARE

func (Point) String

func (p Point) String() string

String return string with coordinates

type Triangulation

type Triangulation struct {
	// contains filtered or unexported fields
}

func NewTp

func NewTp(ps ...Point) (tr *Triangulation, err error)

func (Triangulation) String

func (tr Triangulation) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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