vector3

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vector3

type Vector3 struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
	Z float64 `json:"z"`
}

func Copy

func Copy(vector Vector3) Vector3

func New

func New(x, y, z float64) Vector3

func One

func One() Vector3

func Zero

func Zero() Vector3

func (Vector3) Abs

func (v Vector3) Abs() Vector3

func (Vector3) Add

func (v Vector3) Add(with Vector3) Vector3

func (Vector3) Addf

func (v Vector3) Addf(with float64) Vector3

func (Vector3) AngleTo

func (v Vector3) AngleTo(to Vector3) float64

func (Vector3) BezierDerivative

func (v Vector3) BezierDerivative(control_1, control_2, end Vector3, t float64) Vector3

func (Vector3) BezierInterpolate

func (v Vector3) BezierInterpolate(control_1, control_2, end Vector3, t float64) Vector3

func (Vector3) Bounce

func (v Vector3) Bounce(normal Vector3) Vector3

func (Vector3) Ceil

func (v Vector3) Ceil() Vector3

func (Vector3) Cross

func (v Vector3) Cross(with Vector3) Vector3

func (Vector3) CubicInterpolate

func (v Vector3) CubicInterpolate(b Vector3, pre_a Vector3, post_b Vector3, weight float64) Vector3

func (Vector3) CubicInterpolateInTime

func (v Vector3) CubicInterpolateInTime(b, pre_a, post_b Vector3, weight, b_t, pre_a_t, post_b_t float64) Vector3

func (Vector3) DirectionTo

func (v Vector3) DirectionTo(to Vector3) Vector3

func (Vector3) DistanceSquaredTo

func (v Vector3) DistanceSquaredTo(to Vector3) float64

func (Vector3) DistanceTo

func (v Vector3) DistanceTo(to Vector3) float64

func (Vector3) Div

func (v Vector3) Div(with Vector3) Vector3

func (Vector3) Divf

func (v Vector3) Divf(with float64) Vector3

func (Vector3) Dot

func (v Vector3) Dot(with Vector3) float64

func (Vector3) Floor

func (v Vector3) Floor() Vector3

func (Vector3) Inverse

func (v Vector3) Inverse() Vector3

func (Vector3) IsDown

func (v Vector3) IsDown() bool

func (Vector3) IsEqualApprox

func (v Vector3) IsEqualApprox(b Vector3) bool

func (Vector3) IsNormalized

func (v Vector3) IsNormalized() bool

func (Vector3) IsUp

func (v Vector3) IsUp() bool

func (Vector3) Length

func (v Vector3) Length() float64

func (Vector3) LengthSquared

func (v Vector3) LengthSquared() float64

func (Vector3) Lerp

func (v Vector3) Lerp(to Vector3, weight float64) Vector3

func (Vector3) Mul

func (v Vector3) Mul(with Vector3) Vector3

func (Vector3) Mulf

func (v Vector3) Mulf(with float64) Vector3

func (*Vector3) Normalize

func (v *Vector3) Normalize()

func (Vector3) Normalized

func (v Vector3) Normalized() Vector3

func (Vector3) Posmod

func (v Vector3) Posmod(mod float64) Vector3

func (Vector3) Posmodv

func (v Vector3) Posmodv(modv Vector3) Vector3

func (Vector3) Project

func (v Vector3) Project(to Vector3) Vector3

func (Vector3) Reflect

func (v Vector3) Reflect(normal Vector3) Vector3

func (*Vector3) Rotate

func (v *Vector3) Rotate(axis Vector3, angle float64)

Rotate the current Vector3 around the provided axis by the specified angle.

func (Vector3) Rotated

func (v Vector3) Rotated(axis Vector3, angle float64) Vector3

Return a new Vector3 that is the result of rotating the current Vector3 around the provided axis by the specified angle.

func (Vector3) Round

func (v Vector3) Round() Vector3

func (Vector3) Sign

func (v Vector3) Sign() Vector3

func (Vector3) SignedAngleTo

func (v Vector3) SignedAngleTo(to, axis Vector3) float64

func (Vector3) Slerp

func (v Vector3) Slerp(to Vector3, weight float64) Vector3

func (Vector3) Slide

func (v Vector3) Slide(normal Vector3) Vector3

slide returns the component of the vector along the given plane, specified by its normal vector.

func (Vector3) Sub

func (v Vector3) Sub(with Vector3) Vector3

func (Vector3) Subf

func (v Vector3) Subf(with float64) Vector3

Jump to

Keyboard shortcuts

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