gonum: gonum.org/v1/gonum/spatial/r3 Index | Files

package r3

import "gonum.org/v1/gonum/spatial/r3"

Package r3 provides 3D vectors and boxes and operations on them.

Index

Package Files

doc.go vector.go

type Box Uses

type Box struct {
    Min, Max Vec
}

Box is a 3D bounding box.

type Vec Uses

type Vec struct {
    X, Y, Z float64
}

Vec is a 3D vector.

func (Vec) Add Uses

func (p Vec) Add(q Vec) Vec

Add returns the vector sum of p and q.

func (Vec) Scale Uses

func (p Vec) Scale(f float64) Vec

Scale returns the vector p scaled by f.

func (Vec) Sub Uses

func (p Vec) Sub(q Vec) Vec

Sub returns the vector sum of p and -q.

Package r3 is imported by 1 packages. Updated 2019-05-16. Refresh now. Tools for package owners.