utils

package
v0.0.0-...-193d145 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InverseVector

func InverseVector(v *V)

func ManhattanDistance

func ManhattanDistance(fromX, fromY, toX, toY int32) int32

func Max

func Max[V constraints.Ordered](l, r V) V

func NormalizeVector

func NormalizeVector(v *V)

func VectorLen

func VectorLen(v *V) float64

Types

type V

type V struct {
	X, Y float64
}

func AddVectors

func AddVectors(v1 *V, v2 *V) *V

func VectorFromPoints

func VectorFromPoints(fromX, fromY, toX, toY int32) *V

Jump to

Keyboard shortcuts

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