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.
Click to show internal directories.
Click to hide internal directories.