I'm working on a ray project, so far I was able to draw rays, but now I have to somehow determine their individual lengths and I can't come up with a strategy on my own.
My Ray has an origin (vector x, y) and a direction (unit vector dx, dy). It's a graphics application, so I'm confined by screen space (1024, 768).
How do I go from Point x, y and direction dx, dy to a length, with with I can multiply dx and dy to obtain the end coordinate for my line (ray)?