crypto

package
v0.0.0-...-a4de9da Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InCircle

func InCircle(p Point, t Triangle) bool

InCircle returns true if the point p is inside the circumcircle of the triangle t

func SubDays

func SubDays(t1, t2 time.Time) (day int)

func SubMonth

func SubMonth(t1, t2 time.Time) (month int)

Types

type Edge

type Edge struct {
	P1, P2 Point
}

Edge is an edge with two points

func (Edge) Equals

func (e Edge) Equals(f Edge) bool

Equals returns true if the edge e is equal to the edge f (ignoring the order of points)

type Point

type Point struct {
	X, Y float64
}

Point is a 2D point

type Triangle

type Triangle struct {
	A, B, C Point
}

Triangle is a triangle with three points

func SuperTriangle

func SuperTriangle(points []Point) Triangle

SuperTriangle returns a triangle that contains all points in the given set

func (Triangle) HasVertex

func (t Triangle) HasVertex(p Point) bool

HasVertex returns true if the point p is one of the vertices of the triangle t

type Triangulation

type Triangulation []Triangle

Triangulation is a list of triangles

func Lawson

func Lawson(points []Point) Triangulation

Lawson returns the Delaunay triangulation of the given points using Lawson's algorithm

Jump to

Keyboard shortcuts

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