piper

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 0 Imported by: 2

README

piper

Yet another point in polygon package

Installation

go get -u github.com/iwpnd/piper

Usage

package main

import (
  "fmt"

  "github.com/iwpnd/piper"
  )

func main() {
  p := []float64{0.5,0.5}
  polygon := [][][]float64{{{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}}}

  pip := piper.Pip(p, polygon)

  fmt.Printf("Point in Polygon: %+v\n", pip)
}

License

MIT

Maintainer

Benjamin Ramser - @iwpnd

Project Link: https://github.com/iwpnd/piper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pip

func Pip(p []float64, polygon [][][]float64) bool

Pip checks if Point p is inside input polygon. Does account for holes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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