Math and Computation
Geometric Functions
angle_difference(angle1,angle2) Returns the difference of the given angles in degress, -180 to 180.
is_clockwise(x1,y1,x2,y2,x3,y3) Returns true if the given points are in clockwise order.
line_get_slope(x1,y1,x2,y2) Returns the slope of the given line.
lines_intersect(x1,y1,x2,y2,x3,y3,x4,y4,segment) Determines if two given lines or line segments intersect.
normal_detect(x,y,obj [,rad [,res]]) Returns a 2D surface normal for a point on the "surface" of an object.
point_in_triangle(x1,y1,x2,y2,x3,y3,x4,y4) Returns true if the given point is inside the given triangle.
point_in_polygon(polygon) Returns true of the given point is inside the given polygon.
point_in_circle(x,y,cx,cy,r) Returns true if the test point is within the given circle.
polygon_area(polygon) Returns the area of a given polygon.
polygon_centroid(polygon) Computes the centroid (center of gravity) of a polygon.