geo

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AngleWithRoute

func AngleWithRoute(direction proto.Vector, from, obstacle proto.Point) float64

AngleWithRoute this function returns the angle to a particular target to a given a direction and an origin point, The angle adopts the direction as the base axis, so a positive angle indicates the obstacle is on the left side, while a negative angle indicates that the obstacle if on the right side.

This function is specially useful when a player have opponent player at some point between him and the goal. The angle between the route to the goal and the opponent may be used to decide to change its route.

Types

This section is empty.

Jump to

Keyboard shortcuts

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