Why is m always = 0? The x and y members of someClass are integers.
float getSlope(someClass a, someClass b) { float m = (a.y - b.y) / (a.x -
if (a.y - b.y) is less than (a.x - b.x), m is always zero.
m
so cast it like this.
float m = ((float)(a.y - b.y)) / ((float)(a.x - b.x));