tuple

package
v0.0.0-...-476c911 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EPSILON = 0.00001

Variables

This section is empty.

Functions

func Equal

func Equal(expected Tuple) types.GomegaMatcher

Types

type Tuple

type Tuple struct {
	X float64
	Y float64
	Z float64
	W float64
}

func New

func New(x, y, z, w float64) Tuple

func Point

func Point(x, y, z float64) Tuple

func Vector

func Vector(x, y, z float64) Tuple

func (Tuple) Add

func (t Tuple) Add(s Tuple) Tuple

func (Tuple) ComponentwiseMultiply

func (t Tuple) ComponentwiseMultiply(s Tuple) Tuple

func (Tuple) Cross

func (t Tuple) Cross(s Tuple) Tuple

func (Tuple) Divide

func (t Tuple) Divide(c float64) Tuple

func (Tuple) Dot

func (t Tuple) Dot(s Tuple) float64

func (Tuple) Equals

func (t Tuple) Equals(s Tuple) bool

func (Tuple) IsPoint

func (t Tuple) IsPoint() bool

func (Tuple) IsVector

func (t Tuple) IsVector() bool

func (Tuple) Magnitude

func (t Tuple) Magnitude() float64

func (Tuple) Multiply

func (t Tuple) Multiply(c float64) Tuple

func (Tuple) Negate

func (t Tuple) Negate() Tuple

func (Tuple) Normalize

func (t Tuple) Normalize() Tuple

func (Tuple) Reflect

func (t Tuple) Reflect(normal Tuple) Tuple

func (Tuple) Subtract

func (t Tuple) Subtract(s Tuple) Tuple

Jump to

Keyboard shortcuts

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