Documentation
¶
Index ¶
- type Component
- type System
- type Vector3
- func (v Vector3) Add(other Vector3) Vector3
- func (v Vector3) DivideScalar(scalar float64) Vector3
- func (v Vector3) Magnitude() float64
- func (v Vector3) MultiplyScalar(scalar float64) Vector3
- func (v Vector3) Round(precision int) Vector3
- func (v Vector3) String() string
- func (v Vector3) Subtract(other Vector3) Vector3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vector3 ¶
type Vector3 struct {
X, Y, Z float64
}
Vector3 represents a 3D vector
func (Vector3) DivideScalar ¶
DivideScalar returns the vector divided by a scalar INFO: Ensure the scalar is not zero to avoid division by zero.
func (Vector3) Magnitude ¶
Magnitude returns the length of the vector INFO: Calculating the magnitude as the Euclidean norm.
func (Vector3) MultiplyScalar ¶
MultiplyScalar returns the vector multiplied by a scalar INFO: Scaling the vector components by the given scalar.
func (Vector3) Round ¶
Round returns the vector with each component rounded to the given precision INFO: Rounding the vector components to the supplied precision.
Click to show internal directories.
Click to hide internal directories.