Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 437 Bytes

File metadata and controls

28 lines (21 loc) · 437 Bytes

Name:

Slope

Examples:

void draw(){ float m = Slope(400, 398, 1000, 300); ellipse(m, m, 50, 50); println(m); }

Description:

Calculates the slope of a line given its final and initial x and y coordinates

Syntax:

float Slope(float x2, float x1, float y2, float y1)

##Parameters: x2 = final x coordinate x1 = initial x coordinate y2= final y coordinate y1 = initial y coordinate

##Returns: float m

##Other notes: None