A structure capable of holding a vector with four dimensions: x, y, z, and w.
The contents of the <GrapheneVec4> structure are
private and should never be accessed directly.
Adds each component of the two given vectors.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the resulting vector
Allocates a new <GrapheneVec4> structure.
The contents of the returned structure are undefined.
Use vec4:init to initialize the vector.
Returned: a <GrapheneVec4>.
the newly allocated <GrapheneVec4> structure. Use
vec4:free to free the resources allocated by
this function.
Divides each component of the first operand self by the corresponding component of the second operand b, and places the results into the vector res.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the resulting vector
Computes the dot product of the two given vectors.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Returned: a real number.
the value of the dot product
Checks whether the two given <GrapheneVec4> are
equal.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Returned: a boolean.
true if the two vectors are equal, and false otherwise
Frees the resources allocated by self
Passed: a <GrapheneVec4>.
Retrieves the value of the fourth component of the given
<GrapheneVec4>.
Passed: a <GrapheneVec4>.
Returned: a real number.
the value of the fourth component
Retrieves the value of the first component of the given
<GrapheneVec4>.
Passed: a <GrapheneVec4>.
Returned: a real number.
the value of the first component
Creates a <GrapheneVec2> that contains the first two
components of the given <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec2>.
return location for a <GrapheneVec2>
Creates a <GrapheneVec3> that contains the first
three components of the given <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for a graphene_vec3_t
Retrieves the value of the second component of the given
<GrapheneVec4>.
Passed: a <GrapheneVec4>.
Returned: a real number.
the value of the second component
Retrieves the value of the third component of the given
<GrapheneVec4>.
Passed: a <GrapheneVec4>.
Returned: a real number.
the value of the third component
Initializes a <GrapheneVec4> using the given values.
This function can be called multiple times.
Passed: a <GrapheneVec4>.
Passed: a real number.
the X field of the vector
Passed: a real number.
the Y field of the vector
Passed: a real number.
the Z field of the vector
Passed: a real number.
the W field of the vector
Returned: a <GrapheneVec4>.
a pointer to the initialized vector
Initializes a <GrapheneVec4> with the values inside
the given array.
Passed: a <GrapheneVec4>.
Passed: a f32vector, or a list or vector, each a real number.
an array of four floating point values
Returned: a <GrapheneVec4>.
the initialized vector
Initializes a <GrapheneVec4> using the components of
a <GrapheneVec2> and the values of z and
w.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec2>.
Passed: a real number.
the value for the third component of self
Passed: a real number.
the value for the fourth component of self
Returned: a <GrapheneVec4>.
the initialized vector
Initializes a <GrapheneVec4> using the components of
a <GrapheneVec3> and the value of w.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec3>.
Passed: a real number.
the value for the fourth component of self
Returned: a <GrapheneVec4>.
the initialized vector
Initializes a <GrapheneVec4> using the components of
another <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Returned: a <GrapheneVec4>.
the initialized vector
Linearly interpolates self and v2 using the given factor.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed: a real number.
the interpolation factor
Passed, filled in, and returned: a <GrapheneVec4>.
the interpolated vector
Computes the length of the given <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Returned: a real number.
the length of the vector
Compares each component of the two given vectors and creates a vector that contains the maximum values.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the result vector
Compares each component of the two given vectors and creates a vector that contains the minimum values.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the result vector
Multiplies each component of the two given vectors.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the resulting vector
Compares the two given <GrapheneVec4> vectors and
checks whether their values are within the given epsilon.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed: a real number.
the threshold between the two vectors
Returned: a boolean.
true if the two vectors are near each other
Negates the given <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the result vector
Normalizes the given <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the normalized vector
Retrieves a pointer to a <GrapheneVec4> with all its
components set to 1.
Returned: a <GrapheneVec4>.
a constant vector
Multiplies all components of the given vector with the given scalar factor.
Passed: a <GrapheneVec4>.
Passed: a real number.
the scalar factor
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the result vector
Subtracts from each component of the first operand self the corresponding component of the second operand b and places each result into the components of res.
Passed: a <GrapheneVec4>.
Passed: a <GrapheneVec4>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the resulting vector
Stores the components of the given <GrapheneVec4>
into an array of floating point values.
Passed: a <GrapheneVec4>.
Passed: a f32vector, or a list or vector, each a real number. It is filled in, and returned: a f32vector.
return location for an array of floating point values
Retrieves a pointer to a <GrapheneVec4> with its
components set to (0, 0, 0, 1).
Returned: a <GrapheneVec4>.
a constant vector
Retrieves a pointer to a <GrapheneVec4> with its
components set to (1, 0, 0, 0).
Returned: a <GrapheneVec4>.
a constant vector
Retrieves a pointer to a <GrapheneVec4> with its
components set to (0, 1, 0, 0).
Returned: a <GrapheneVec4>.
a constant vector
Retrieves a pointer to a <GrapheneVec4> with its
components set to (0, 0, 1, 0).
Returned: a <GrapheneVec4>.
a constant vector
Retrieves a pointer to a <GrapheneVec4> with all its
components set to 0.
Returned: a <GrapheneVec4>.
a constant vector