# Finding coords 100px away

**URL:** <https://forum.kirupa.com/t/finding-coords-100px-away/231084>\
**Category:** flash\
**Created:** [July 2, 2007, 4:15am UTC](https://forum.kirupa.com/t/finding-coords-100px-away/231084 "2007-07-02T04:15:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunforce](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@arunforce](https://forum.kirupa.com/u/arunforce)\
**Post date:** [July 2, 2007, 4:15am UTC](https://forum.kirupa.com/t/finding-coords-100px-away/231084/1 "2007-07-02T04:15:26Z")

</div>

Ok, my head isn’t working so it would be faster if someone justs helps me/double checks my trig.

I have a point at 300,300 or whatever, and I’m trying to find the points 100px away at any given angle… Say at angle 0  
X is source, x is target 100 px away  
ActionScript Code:  
[FONT=Courier New][LEFT]|||||||||||||||||||||||  
[FONT=Courier New]|||||||||||||||||||||||[/FONT]  
[FONT=Courier New]|||||||||[/FONT]X[FONT=Courier New]|||||||||||[/FONT]x|  
||||COLOR=#000000||||||||||  
[FONT=Courier New]|||||||||||||||||||||||[/FONT]  
[FONT=Courier New]|||||||||||||||||||||||[/FONT]  
[/LEFT]  
[/FONT]

0 degree angle so ------ (400,300) is 100 px away

However  
Say that the point is 100 px away at a 23 degree angle  
ActionScript Code:  
[FONT=Courier New][LEFT][FONT=Courier New]|||||||||||||||||||||||[/FONT]  
[FONT=Courier New]||||||||||||||||||||[/FONT]x||  
[FONT=Courier New]|||||||||||X|||||||||||[/FONT]  
|||||||COLOR=#000000|||||||  
[/COLOR][FONT=Courier New]|||||||||||||||||||||||[/FONT]  
[FONT=Courier New]|||||||||||||||||||||||[/FONT]

[/LEFT]  
[/FONT]

My brain isn’t working, it’s night time and I need to implement it before tomorrow… So what actionscript function could I use to find the target pixels 100 pixels away at any given degree. I don’t mind writing a function like target(300,300,23,100) but I rather use a function or what not. It’s basically a point at an angle, with a given radius. The only thing it needs to be is fast/optimized, so I’m cautious about writing \> 10 lines of code.

Sorry if my message is incoherent, I’m half awake at this point… ☹

Sorry about wrong forum… See I’m half asleep. :S
