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 -
You are performing calculations on integers and assigning its result to float. So compiler is implicitly converting your integer result into float