Log In  

Cart #zohasaberi-8 | 2019-05-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

I figured out how to use distance formulas to determine if a point lies within a non-orthogonal rectangular region. I can see many possible applications of this and thought I would share my solution. I'm sure there is a more efficient way to do this, but this is the best solution I could come up with at the time that didn't involve vector math. I tried to comment my code to help people understand it better, but I didn't go into great detail with explaining the math. Anyway, It only took me about an hour to come up with this demo but I hope someone can find it useful.

P#64361 2019-05-13 07:50


[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2019-12-07 01:08 | 0.016s | 2097k | Q:33