How can let one object collision with line (use J2ME)??
Eg: Have a line which slope is 2 and the object (ball ) sleep is 5 and then fly toward to that line. how can let it reflect when the object (ball) collision with line??
try to visualize a line perpendicular to your initial line that passes through the center of your ball.
the slope of this line is the reciprical of your initial line:
now you have two linear equations and can look at the intersection point.
when the distance between the intersection point and the center of the ball is <= radius of the ball, you have a collision.