Computes the dot product of the two given vectors.
a #graphene_vec2_t
Checks whether the two given #graphene_vec2_t are equal.
a #graphene_vec2_t
Frees the resources allocated by v
Retrieves the X component of the #graphene_vec2_t.
Retrieves the Y component of the #graphene_vec2_t.
Initializes a #graphene_vec2_t using the given values.
This function can be called multiple times.
the X field of the vector
the Y field of the vector
Initializes v
with the contents of the given array.
an array of floating point values with at least two elements
Computes the length of the given vector.
Compares the two given #graphene_vec2_t vectors and checks
whether their values are within the given epsilon
.
a #graphene_vec2_t
the threshold between the two vectors
Negates the given #graphene_vec2_t.
Computes the normalized vector for the given vector v
.
Multiplies all components of the given vector with the given scalar factor
.
the scalar factor
Stores the components of v
into an array.
Allocates a new #graphene_vec2_t structure.
The contents of the returned structure are undefined.
Use graphene_vec2_init() to initialize the vector.
Retrieves a constant vector with (1, 1) components.
Retrieves a constant vector with (1, 0) components.
Retrieves a constant vector with (0, 1) components.
Retrieves a constant vector with (0, 0) components.
A structure capable of holding a vector with two dimensions, x and y.
The contents of the #graphene_vec2_t structure are private and should never be accessed directly.