geom

package
v0.0.0-...-157546e Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistanceSq

func DistanceSq(x0, y0, x1, y1 float64) float64

Types

type Vec2

type Vec2 struct {
	X, Y float64
}

func (Vec2) Add

func (v Vec2) Add(v2 Vec2) Vec2

func (Vec2) Div

func (v Vec2) Div(v2 Vec2) Vec2

func (Vec2) Mul

func (v Vec2) Mul(v2 Vec2) Vec2

func (Vec2) MulN

func (v Vec2) MulN(n float64) Vec2

func (Vec2) Normalize

func (v Vec2) Normalize() Vec2

func (Vec2) Rotate

func (v Vec2) Rotate(angle float64) Vec2

func (Vec2) RotateAroundCenter

func (v Vec2) RotateAroundCenter(center Vec2, angle float64) Vec2

func (Vec2) String

func (v Vec2) String() string

func (Vec2) Sub

func (v Vec2) Sub(v2 Vec2) Vec2

type Vec3

type Vec3 struct {
	X, Y, Z float64
}

func (Vec3) Add

func (v Vec3) Add(v2 Vec3) Vec3

func (Vec3) AsUHash

func (v Vec3) AsUHash() uint32

func (Vec3) AsUHashXZ

func (v Vec3) AsUHashXZ() uint16

func (Vec3) DistanceTo

func (v Vec3) DistanceTo(v2 Vec3) float64

func (Vec3) Floor

func (v Vec3) Floor() Vec3

func (Vec3) FromUHash

func (v Vec3) FromUHash(hash uint32) Vec3

func (Vec3) FromUHashXZ

func (v Vec3) FromUHashXZ(hash uint16) Vec3

func (Vec3) Mul

func (v Vec3) Mul(v2 Vec3) Vec3

func (Vec3) MulN

func (v Vec3) MulN(n float64) Vec3

func (Vec3) Normalize

func (v Vec3) Normalize() Vec3

func (Vec3) String

func (v Vec3) String() string

func (Vec3) Sub

func (v Vec3) Sub(v2 Vec3) Vec3

func (Vec3) Zero

func (v Vec3) Zero() bool

Jump to

Keyboard shortcuts

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