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 ¶
Types ¶
type Rotation ¶ added in v0.9.0
Rotation describes a rotation in space.
func NewRotation ¶ added in v0.9.0
NewRotation creates a rotation by alpha, around axis.
type Vec ¶
type Vec struct {
X, Y, Z float64
}
Vec is a 3D vector.
func Rotate ¶ added in v0.9.0
Rotate returns a new vector, rotated by alpha around the provided axis.
func Unit ¶ added in v0.8.0
Unit returns the unit vector colinear to p. Unit returns {NaN,NaN,NaN} for the zero vector.
func (Vec) Rotate ¶ added in v0.9.0
Rotate returns a new vector, rotated by alpha around the provided axis.
DEPRECATED: use r3.Rotate
Click to show internal directories.
Click to hide internal directories.