slope of a line

how can we calculate slope of a line whose starting and ending points are given in 2d array?
 
float a[2][2];


the first part has the values, starting and ending, of x coordinate and second stores the values of y coordinate
The difference in the y components divided by the difference in the x components.
Topic archived. No new replies allowed.