# Math'd Out

**URL:** <https://forum.kirupa.com/t/mathd-out/230899>\
**Category:** flash\
**Created:** [June 29, 2007, 8:07pm UTC](https://forum.kirupa.com/t/mathd-out/230899 "2007-06-29T20:07:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![creatify](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@creatify](https://forum.kirupa.com/u/creatify)\
**Post date:** [June 29, 2007, 8:07pm UTC](https://forum.kirupa.com/t/mathd-out/230899/1 "2007-06-29T20:07:12Z")

</div>

this should be simple enough, but I’m so knee deep in cos and sin and atan right now, I just can’t quite get this:

Have a ball - it may be located anywhere in the black bounding box.

I generate a random angle - well its not totally random, the angle is generated from the balls x,y position through the centerpoint of the black bounding box.

I need to know the x,y intersect of that invisible (green angled) line on the bounding box.

A formula would be highly appreciated, thanks!
