normalmath

package
v0.0.0-...-2e4101f Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2017 License: Zlib Imports: 2 Imported by: 0

Documentation

Overview

Math for working with normals.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombineNormals64

func CombineNormals64(norms ...vgimage.Normal64) vgimage.Normal64

Types

type Angle

type Angle struct {
	X, Y, Z float64
}

func (*Angle) FromNormal64

func (a *Angle) FromNormal64(n vgimage.Normal64)

func (Angle) Normal64

func (a Angle) Normal64() vgimage.Normal64

type Quaternion

type Quaternion struct {
	X, Y, Z, W float64
}

func (*Quaternion) FromAngle

func (q *Quaternion) FromAngle(a Angle)

func (*Quaternion) FromNormal64

func (q *Quaternion) FromNormal64(n vgimage.Normal64)

Produces the same result as Angle.FromNormal64() followed by Quaternion.FromAngle(), but faster.

func (Quaternion) Multiply

func (q Quaternion) Multiply(other Quaternion) Quaternion

func (*Quaternion) Normal64

func (q *Quaternion) Normal64() vgimage.Normal64

Produces the same result as Quaternion.ToAngle() followed by Angle.Normal64(), but faster.

func (*Quaternion) Normalize

func (q *Quaternion) Normalize()

func (*Quaternion) ToAngle

func (q *Quaternion) ToAngle(a *Angle)

Jump to

Keyboard shortcuts

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