v2
New functions:
line_getRightTriSides() - Get length of sides of a right triangle formed by a given line
line_length() - Get length of line, given a line object or two sets of coordinates
Added:
line_getRTriSides(x1, y1, x2, y2, l)
Get length of sides of a right triangle formed by a given line
Parameters:
x1: x coordinate 1 (int - optional, required if argument l is not specified)
y1: y coordinate 1 (float - optional, required if argument l is not specified)
x2: x coordinate 2 (int - optional, required if argument l is not specified)
y2: y coordinate 2 (float - optional, required if argument l is not specified)
l: line object (line - optional, required if x1, y1, x2, y2 agruments are not specified)
Returns: [a (Δy), b (Δx), c (Hypotenuse)]
line_length(x1, y1, x2, y2, l)
Get length of line, given a line object or two sets of coordinates
Parameters:
x1: x coordinate 1 (int - optional, required if argument l is not specified)
y1: y coordinate 1 (float - optional, required if argument l is not specified)
x2: x coordinate 2 (int - optional, required if argument l is not specified)
y2: y coordinate 2 (float - optional, required if argument l is not specified)
l: line object (line - optional, required if x1, y1, x2, y2 agruments are not specified)
Returns: length of line (float)