utils

package
v0.0.0-...-7a6bf91 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClampFloat64

func ClampFloat64(val float64, min float64, max float64) float64

func TowardsByFloat64

func TowardsByFloat64(val, target, by float64) float64

Types

type FloatPair

type FloatPair struct {
	X, Y float64
}

func (FloatPair) DistanceTo

func (pair FloatPair) DistanceTo(other FloatPair) float64

func (FloatPair) Length

func (pair FloatPair) Length() float64

func (FloatPair) Minus

func (pair FloatPair) Minus(other FloatPair) FloatPair

func (FloatPair) Multiply

func (pair FloatPair) Multiply(other float64) FloatPair

func (FloatPair) Negative

func (pair FloatPair) Negative() FloatPair

func (FloatPair) Normalized

func (pair FloatPair) Normalized() FloatPair

func (FloatPair) Plus

func (pair FloatPair) Plus(other FloatPair) FloatPair

func (FloatPair) ToInt

func (pair FloatPair) ToInt() IntPair

type IntPair

type IntPair struct {
	X, Y int
}

func (IntPair) Minus

func (pair IntPair) Minus(other IntPair) IntPair

func (IntPair) Plus

func (pair IntPair) Plus(other IntPair) IntPair

func (IntPair) ToFloat

func (pair IntPair) ToFloat() FloatPair

Jump to

Keyboard shortcuts

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