I've got a right triangle and I want to check if a given point is on the Hypotenuse of that triangle. All points are plain integers, not floating-point variables.
Edit: All green squares would be on the hypotenuse, the white squares not. I know x, y, the Coordinates of the Corners and the Coordinates of the Point I want to test. All Coordinates are whole numbers (y is a little bit off in the drawing, sorry).