A point with two coordinates.
xthe X coordinate of the point
ythe Y coordinate of the point
Allocates a new <GraphenePoint> structure.
The coordinates of the returned point are (0, 0).
It’s possible to chain this function with point:init or point:init-from-point, e.g.:
graphene_point_t *
point_new (float x, float y)
{
return graphene_point_init (graphene_point_alloc (), x, y);
}
graphene_point_t *
point_copy (const graphene_point_t *p)
{
return graphene_point_init_from_point (graphene_point_alloc (), p);
}
Returned: a <GraphenePoint>.
the newly allocated <GraphenePoint>. Use
point:free to free the resources allocated by
this function.
Computes the distance between self and b.
Passed: a <GraphenePoint>.
Passed: a <GraphenePoint>.
Returned: a real number.
the distance between the two points
Returned: a real number.
distance component on the X axis
Returned: a real number.
distance component on the Y axis
Checks if the two points self and b point to the same coordinates.
This function accounts for floating point fluctuations; if you want to
control the fuzziness of the match, you can use point:near? instead.
Passed: a <GraphenePoint>.
Passed: a <GraphenePoint>.
Returned: a boolean.
true if the points have the same coordinates
Frees the resources allocated by point:alloc.
Passed: a <GraphenePoint>.
Initializes self to the given x and y coordinates.
It’s safe to call this function multiple times.
Passed: a <GraphenePoint>.
Passed: a real number.
the X coordinate
Passed: a real number.
the Y coordinate
Returned: a <GraphenePoint>.
the initialized point
Initializes self with the same coordinates of src.
Passed: a <GraphenePoint>.
Passed: a <GraphenePoint>.
the <GraphenePoint> to use
Returned: a <GraphenePoint>.
the initialized point
Initializes self with the coordinates inside the given
<GrapheneVec2>.
Passed: a <GraphenePoint>.
the <GraphenePoint> to initialize
Passed: a <GrapheneVec2>.
Returned: a <GraphenePoint>.
the initialized point
Linearly interpolates the coordinates of self and b using the given factor.
Passed: a <GraphenePoint>.
Passed: a <GraphenePoint>.
Passed: a real number.
the linear interpolation factor
Passed, filled in, and returned: a <GraphenePoint>.
return location for the interpolated point
Checks whether the two points self and b are within the threshold of epsilon.
Passed: a <GraphenePoint>.
Passed: a <GraphenePoint>.
Passed: a real number.
threshold between the two points
Returned: a boolean.
true if the distance is within epsilon
Stores the coordinates of the given <GraphenePoint>
into a <GrapheneVec2>.
Passed: a <GraphenePoint>.
Passed, filled in, and returned: a <GrapheneVec2>.
return location for the vertex
Returns a point fixed at (0, 0).
Returned: a <GraphenePoint>.
a fixed point