Optionalproperties: Partial<{}>Computes the dot product of the two given vectors.
the dot product of the vectors
Checks whether the two given Graphene.Vec2 are equal.
true if the two vectors are equal, and false otherwise
Frees the resources allocated by v
Initializes a Graphene.Vec2 using the given values.
This function can be called multiple times.
the X field of the vector
the Y field of the vector
the initialized vector
Initializes v with the contents of the given array.
an array of floating point values with at least two elements
the initialized vector
Computes the length of the given vector.
the length of the vector
Compares the two given Graphene.Vec2 vectors and checks
whether their values are within the given epsilon.
the threshold between the two vectors
true if the two vectors are near each other
Negates the given Graphene.Vec2.
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.
StaticallocStaticoneRetrieves a constant vector with (1, 1) components.
Staticx_Retrieves a constant vector with (1, 0) components.
Staticy_Retrieves a constant vector with (0, 1) components.
StaticzeroRetrieves 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 structure are private and should never be accessed directly.