core

package
v0.0.0-...-955dece Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vector

type Vector struct {
	X, Y, Z float64
}

Vector - struct holding X Y Z values of a 3D vector

func (Vector) Add

func (a Vector) Add(b Vector) Vector

Add - adds two vectors together

func (Vector) Cross

func (a Vector) Cross(b Vector) Vector

Cross - calculates the cross product of two Vectors

func (Vector) Dot

func (a Vector) Dot(b Vector) float64

Dot - calculates the dot product of two Vectors

func (Vector) Length

func (a Vector) Length() float64

Length - calculates the length(magnitude) of the Vector

func (Vector) MultiplyByScalar

func (a Vector) MultiplyByScalar(s float64) Vector

MultiplyByScalar - multiplies a Vector by s float64

func (Vector) Normalize

func (a Vector) Normalize() Vector

Normalize - returns a versor created from the given vector

func (Vector) Sub

func (a Vector) Sub(b Vector) Vector

Sub - subtracts b Vector from a Vector

Jump to

Keyboard shortcuts

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