matrix

package
v0.0.0-...-39567c2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matrix3x3

type Matrix3x3 [3][3]int

func AllRotations

func AllRotations() []Matrix3x3

func Ident

func Ident() Matrix3x3

func Rotation

func Rotation(i int) Matrix3x3

func (Matrix3x3) Clone

func (m Matrix3x3) Clone() Matrix3x3

func (Matrix3x3) Mul

func (m Matrix3x3) Mul(n Matrix3x3) Matrix3x3

func (Matrix3x3) Pow

func (m Matrix3x3) Pow(n int) Matrix3x3

func (Matrix3x3) Transpose

func (m Matrix3x3) Transpose() Matrix3x3

type Point3

type Point3 [3]int

Point3 is a point in 3-space.

func (Point3) Clone

func (p Point3) Clone() Point3

func (Point3) Mul

func (p Point3) Mul(rot Matrix3x3) Point3

func (Point3) Offset

func (p Point3) Offset(q Vector3) Point3

func (Point3) Sub

func (p Point3) Sub(q Point3) Vector3

func (Point3) X

func (p Point3) X() int

func (Point3) Y

func (p Point3) Y() int

func (Point3) Z

func (p Point3) Z() int

type Vector3

type Vector3 [3]int

Vector3 is a vector in 3-space, or a difference between two points.

func (Vector3) Add

func (v Vector3) Add(w Vector3) Vector3

func (Vector3) Eq

func (v Vector3) Eq(w Vector3) bool

func (Vector3) Mul

func (v Vector3) Mul(rot Matrix3x3) Vector3

Jump to

Keyboard shortcuts

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