
- Code: Select all
double a = (y2-y1)/(x2-x1);
double b=-a*x2+y2;
double x=y/a-b/a;
counts intersection point of line and rectangle....
what if x2==x1?

double a = (y2-y1)/(x2-x1);
double b=-a*x2+y2;
double x=y/a-b/a;
Users browsing this forum: BLEX [Bot], Claude [Bot], Semrush [Bot] and 1 guest