You are currently viewing the gmlscripts.pro static mirror. Forum access and script submissions are not available through this mirror.

Invert gmlscripts.pro

line_get_slope

line_get_slope(x1,y1,x2,y2)
Returns the slope of the given line.
COPY/// line_get_slope(x1,y1,x2,y2)
//
//  Returns the slope of the given line. If (x1 == x2),
//  this function will cause a divide by zero error.
//
//      x1, y1      1st point
//      x2, y2      2nd point
//
/// gmlscripts.pro/license
{
    return ( (argument3 - argument1) / (argument2 - argument0) );
}

Contributors: Leif902

GitHub: View · Commits · Blame · Raw