angle

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Pi2  = math.Pi * 2
	IPi2 = 1 / Pi2
)

Variables

This section is empty.

Functions

func Norm

func Norm(a float64) float64

Norm normalizes angle between <-math.Pi, math.Pi>

func Random

func Random() float64

Random returns random angle in range <-math.Pi, math.Pi>

func To

func To(a, b float64) float64

To returns shortest step form a to b

assuming angles are ranging from <-math.Pi, math.Pi>

func Turn

func Turn(start, dest, vel float64) float64

Turn turns the angle from start to dest by velocity, always the shorter way

assuming angles are ranging from <-math.Pi, math.Pi>

Types

This section is empty.

Jump to

Keyboard shortcuts

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