Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Equation For Specific Line Length Needed
#11
(08-17-2022, 05:08 PM)bplus Wrote: Ah yes, when my = heroY then the difference is 0 and will get division by 0 error, unless _ATAN2() can "tolerate" that condition which is possible if _ATAN2() were good because that is likely problem. So test my code and see if throws error when mouse is level with HeroY.

Update: Yeah, seems OK when my = HeroY  so _ATAN2() can handle 0 in the 2nd argument. It has no problem drawing horizontal swords.

Interesting B+. I did wonder about something similar the other day. Also, when I did division by 0 on my calculator app, the outcome said: INF. So it is programmed to handle it.
Reply


Messages In This Thread
RE: Equation For Specific Line Length Needed - by SierraKen - 08-17-2022, 05:24 PM



Users browsing this thread: 5 Guest(s)