r3

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: BSD-3-Clause Imports: 0 Imported by: 108

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	Min, Max Vec
}

Box is a 3D bounding box.

type Vec

type Vec struct {
	X, Y, Z float64
}

Vec is a 3D vector.

func (Vec) Add

func (p Vec) Add(q Vec) Vec

Add returns the vector sum of p and q.

func (Vec) Scale

func (p Vec) Scale(f float64) Vec

Scale returns the vector p scaled by f.

func (Vec) Sub

func (p Vec) Sub(q Vec) Vec

Sub returns the vector sum of p and -q.

Jump to

Keyboard shortcuts

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