edge

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: BSD-3-Clause Imports: 1 Imported by: 2

README

Docs: GoDoc

The edge package has methods for wrapping / clipping coordinates around edges.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Edge

func Edge(ci, max int, wrap bool) (int, bool)

Edge returns coordinate value based on either wrapping or clipping at the edge and if not wrapping, if it should be clipped (ignored)

func WrapMinDist

func WrapMinDist(ci, max, ctr float32) float32

WrapMinDist returns the wrapped coordinate value that is closest to ctr i.e., if going out beyond max is closer, then returns that coordinate else if going below 0 is closer than not, then returns that coord

Types

This section is empty.

Jump to

Keyboard shortcuts

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