math

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vector3

type Vector3 struct {
	X, Y, Z float32
}

func NewVector3

func NewVector3(x, y, z float32) *Vector3

func (*Vector3) Abs

func (v *Vector3) Abs() *Vector3

func (*Vector3) Add

func (v *Vector3) Add(x, y, z float32) *Vector3

func (*Vector3) AddFromVector3

func (v *Vector3) AddFromVector3(vector3 *Vector3) *Vector3

func (*Vector3) AsVector3

func (v *Vector3) AsVector3() *Vector3

func (*Vector3) Ceil

func (v *Vector3) Ceil() *Vector3

func (*Vector3) Cross

func (v *Vector3) Cross(vector3 *Vector3) *Vector3

func (*Vector3) Distance

func (v *Vector3) Distance(pos *Vector3) float32

func (*Vector3) DistanceSquared

func (v *Vector3) DistanceSquared(pos *Vector3) float32

func (*Vector3) Divide

func (v *Vector3) Divide(num float32) *Vector3

func (*Vector3) Dot

func (v *Vector3) Dot(pos *Vector3) float32

func (*Vector3) Equals

func (v *Vector3) Equals(vector3 *Vector3) bool

func (*Vector3) Floor

func (v *Vector3) Floor() *Vector3

func (*Vector3) GetIntermediateWithXValue

func (v *Vector3) GetIntermediateWithXValue(vector3 *Vector3, x float32) *Vector3

GetIntermediateWithXValue returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or nil if not possible.

func (*Vector3) GetIntermediateWithYValue

func (v *Vector3) GetIntermediateWithYValue(vector3 *Vector3, y float32) *Vector3

GetIntermediateWithYValue returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or nil if not possible.

func (*Vector3) GetIntermediateWithZValue

func (v *Vector3) GetIntermediateWithZValue(vector3 *Vector3, z float32) *Vector3

GetIntermediateWithZValue returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or nil if not possible.

func (*Vector3) Length

func (v *Vector3) Length() float32

func (*Vector3) LengthSquared

func (v *Vector3) LengthSquared() float32

func (*Vector3) MaxPlainDistance

func (v *Vector3) MaxPlainDistance(pos *Vector3) float32

func (*Vector3) Multiply

func (v *Vector3) Multiply(num float32) *Vector3

func (*Vector3) Normalize

func (v *Vector3) Normalize() *Vector3

func (*Vector3) Round

func (v *Vector3) Round() *Vector3

func (*Vector3) RoundToEven

func (v *Vector3) RoundToEven() *Vector3

func (*Vector3) SetComponents

func (v *Vector3) SetComponents(x, y, z float32)

func (*Vector3) Subtract

func (v *Vector3) Subtract(x, y, z float32) *Vector3

func (*Vector3) SubtractFromVector3

func (v *Vector3) SubtractFromVector3(vector3 *Vector3) *Vector3

Jump to

Keyboard shortcuts

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