Documentation ¶
Index ¶
- type Vector3
- func (v Vector3) Add(vec2 Vector3) Vector3
- func (v Vector3) CrossProduct(vec2 Vector3) Vector3
- func (v Vector3) Divide(vec2 Vector3) Vector3
- func (v Vector3) DotProduct(vec2 Vector3) float64
- func (v Vector3) Inverse() Vector3
- func (v Vector3) Length() float64
- func (v Vector3) LengthSquared() float64
- func (v Vector3) ScalarMultiply(scalar float64) Vector3
- func (v Vector3) Subtract(vec2 Vector3) Vector3
- func (v Vector3) VectorMultiply(vec2 Vector3) Vector3
- func (v Vector3) X() float64
- func (v Vector3) Y() float64
- func (v Vector3) Z() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vector3 ¶
type Vector3 struct {
// contains filtered or unexported fields
}
Vector3 represents a 3 element vector
func (Vector3) CrossProduct ¶
CrossProduct returns the cross product (vector product) of two vectors
func (Vector3) DotProduct ¶
DotProduct returns the dot product (scalar product) of two vectors
func (Vector3) Inverse ¶
Inverse returns new vector with all the elements of the current vector inversed
func (Vector3) LengthSquared ¶
LengthSquared returns sum of all the elements squared
func (Vector3) ScalarMultiply ¶
ScalarMultiply returns the result of multiplying current vector by a scalar (scalar multiplication)
func (Vector3) VectorMultiply ¶
VectorMultiply returns the result of multiplying current vector by another vector
Click to show internal directories.
Click to hide internal directories.