cmath

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: AGPL-3.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(x, y *Vec3) float64

func MNaN32

func MNaN32() float32

Types

type SpacePosition

type SpacePosition struct {
	Location Vec3 `db:"location" json:"location"`
	Rotation Vec3 `db:"rotation" json:"rotation"`
	Scale    Vec3 `db:"scale" json:"scale"`
}

type Vec3

type Vec3 struct {
	X float32 `json:"x" db:"x"`
	Y float32 `json:"y" db:"y"`
	Z float32 `json:"z" db:"z"`
}

func Add

func Add(v1 Vec3, v2 Vec3) Vec3

func DefaultPosition

func DefaultPosition() Vec3

DefaultPosition FIXME: Magic numbers ?

func MNan32Vec3

func MNan32Vec3() Vec3

func MultiplyN

func MultiplyN(v Vec3, n float32) Vec3

func (*Vec3) Plus

func (v *Vec3) Plus(v2 Vec3)

func (*Vec3) ToVec3f64

func (v *Vec3) ToVec3f64() Vec3f64

type Vec3f64

type Vec3f64 struct {
	X float64 `json:"x" db:"x"`
	Y float64 `json:"y" db:"y"`
	Z float64 `json:"z" db:"z"`
}

func (*Vec3f64) ToVec3

func (v *Vec3f64) ToVec3() Vec3

Jump to

Keyboard shortcuts

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