geometry

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: AGPL-3.0 Imports: 1 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Segment

func Segment(lhs Vec3, rhs Vec3) float64

Segment returns the distance between 2 points following XYZ axis.

Types

type Vec2

type Vec2 struct {
	X float64
	Y float64
}

Vec2 is a 2D position. Coordinates are in float64.

type Vec3

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

Vec3 is a 3D position. Coordinates are in float64.

func (*Vec3) Add

func (v *Vec3) Add(p Vec3)

Add add vector coordinates to v.

func (*Vec3) MoveReference

func (v *Vec3) MoveReference(lhs Vec3, rhs Vec3)

MoveReference moves v to a new reference. lhs and rhs must refer to a identical point in both references.

Jump to

Keyboard shortcuts

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