chord

package
v0.0.0-...-d4b7e32 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistanceAbsolute

func DistanceAbsolute(out, to, from []byte)

DistanceAbsolute computes the distance moving either clockwise or anticlockwise on the circle. to, from, and out must be the same length or DistanceAbsolute will panic

dist = abs(to - from) = abs(from - to)

func DistanceForward

func DistanceForward(out, to, from []byte)

Distance computes the distance moving clockwise around the circle, starting at a, and going to b. to, from, and out must be the same length or DistanceForward will panic

dist = (to - from) % m where m is the 2^(len(out)*8)a

Types

This section is empty.

Jump to

Keyboard shortcuts

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