Er, the final point would be the point I calculated above (5,5) minus the center point (1, 5), so it'd be (4, 0). While that *is* where the line would intersect the top, in this case a 45 degree angle hits the side first.
I think if you took your code above but changed the condition tests to the following format
[code]
Case ((Angle >= 270+ angle_a) AND (Angle < angle_a)) OR ((Angle >= 90+angle_a) AND (Angle < 180+angle_a))
[code]
using the angle to corner method I detailed above, the code would work correctly.
I think if you took your code above but changed the condition tests to the following format
[code]
Case ((Angle >= 270+ angle_a) AND (Angle < angle_a)) OR ((Angle >= 90+angle_a) AND (Angle < 180+angle_a))
[code]
using the angle to corner method I detailed above, the code would work correctly.