package
0.0.0-20240502073936-1137f6adf7e9
Repository: https://github.com/ungerik/go3d.git
Documentation: pkg.go.dev
# Functions
Add adds the composants of the two vectors and returns a new vector with the sum of the two vectors.
Angle returns the angle value of the (shortest/smallest) angle between the two vectors a and b.
Cosine returns the cosine value of the angle between the two vectors.
Cross returns the cross product of two vectors.
Distance the distance between two vectors.
Dot returns the dot product of two vectors.
From copies a T from a generic.T implementation.
Interpolate interpolates between a and b at t (0,1).
Joined returns the minimal box containing both a and b.
Max returns the component wise maximum of two vectors.
Min returns the component wise minimum of two vectors.
Mul returns the component wise product of two vectors.
Parse parses T from a string.
ParseBox parses a Box from a string.
PracticallyEquals compares two values if they are equal with each other within a delta tolerance.
Sinus returns the sinus value of the (shortest/smallest) angle between the two vectors a and b.
SquareDistance the distance between two vectors squared (= distance*distance).
Sub returns the difference of two vectors.
# Variables
Black holds the color black.
Blue holds the color blue.
Green holds the color green.
MaxBox holds a box that contains the entire R3 space that can be represented as vec3.
MaxVal holds a vector with the highest possible component values.
MinVal holds a vector with the smallest possible component values.
Red holds the color red.
UnitX holds a vector with X set to one.
UnitXYZ holds a vector with X, Y, Z set to one.
UnitY holds a vector with Y set to one.
UnitZ holds a vector with Z set to one.
White holds the color white.
Zero holds a zero vector.
# Type aliases
T represents a 3D vector.