[Flashcoders] calculating distance between two points

2008-03-11 Thread Lehr, Theodore M (N-SGIS)
How do you calculate the distance between two points with different x and y values? I know it is some simple math formula - I just don't know it ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Kenneth Kawamoto
You can use our old friend Pythagoras': c^2 = a^2 + b^2 Kenneth Kawamoto http://www.materiaprima.co.uk/ Lehr, Theodore M (N-SGIS) wrote: How do you calculate the distance between two points with different x and y values? I know it is some simple math formula - I just don't know it

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Anthony Cintron
dx:Number = obj1.x - obj2.x; dy:Number = obj1.y - obj2.y; distance:Number = Math.sqrt(dx * dx + dy * dy); On Tue, Mar 11, 2008 at 8:05 AM, Lehr, Theodore M (N-SGIS) [EMAIL PROTECTED] wrote: How do you calculate the distance between two points with different x and y values? I know it is some

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Ivan Dembicki
Or you can use new revolutionary Point.distance(pt1, pt2); -- iv http://www.bezier.ru http://bezier.googlecode.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

RE: [Flashcoders] calculating distance between two points

2008-03-11 Thread Graham.Burton
The square root of the sum of the squares of the x difference and the y difference. Pythagoras -Original Message- How do you calculate the distance between two points with different x and y values? I know it is some simple math formula - I just don't know it

RE: [Flashcoders] calculating distance between two points

2008-03-11 Thread Jim Hayes
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lehr, Theodore M (N-SGIS) Sent: 11 March 2008 12:05 To: Flash Coders List Subject: [Flashcoders] calculating distance between two points How do you calculate the distance between two points with different x and y values? I know it is some

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Paul Andrews
PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, March 11, 2008 12:05 PM Subject: [Flashcoders] calculating distance between two points How do you calculate the distance between two points with different x and y values? I know it is some simple math formula - I just

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Fumio Nonaka
, but if there is I don't know what it is. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lehr, Theodore M (N-SGIS) Sent: 11 March 2008 12:05 To: Flash Coders List Subject: [Flashcoders] calculating distance between two points How do you calculate the distance between two

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Paul Andrews
Aha - didn't know about that! Paul - Original Message - From: Ivan Dembicki [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, March 11, 2008 12:34 PM Subject: Re: [Flashcoders] calculating distance between two points Or you

RE: [Flashcoders] calculating distance between two points

2008-03-11 Thread Merrill, Jason
Your teacher must be cringing! The square of the hypotenuse equals the sum of the squares of the opposite two sides should be familar.. ;-) Math.sqrt ( Math.pow(Math.abs(x1-x2),2 )+Math.pow(Math.abs(y1-y2),2 )+)) Why not skip the math lessons and use the Point class? var dist:Number =

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Piers Cowburn
Good point On 11 Mar 2008, at 13:53, Merrill, Jason wrote: Why not skip the math lessons and use the Point class? var dist:Number = Point.distance(p1, p2); Jason Merrill Bank of America GTO LLD Solutions Design Development eTools Multimedia Bank of America Flash Platform Developer

RE: [Flashcoders] calculating distance between two points

2008-03-11 Thread Merrill, Jason
Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Piers Cowburn Sent: Tuesday, March 11, 2008 10:24 AM To: Flash Coders List Subject: Re: [Flashcoders] calculating distance between two points Good point On 11 Mar 2008, at 13:53

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Allandt Bik-Elliott (Receptacle)
aargh that pun made me bleed On 11 Mar 2008, at 14:24, Piers Cowburn wrote: Good point On 11 Mar 2008, at 13:53, Merrill, Jason wrote: Why not skip the math lessons and use the Point class? var dist:Number = Point.distance(p1, p2); Jason Merrill Bank of America GTO LLD

RE: [Flashcoders] calculating distance between two points

2008-03-11 Thread Jim Hayes
12:35 To: [EMAIL PROTECTED]; Flash Coders List Subject: Re: [Flashcoders] calculating distance between two points Or you can use new revolutionary Point.distance(pt1, pt2); -- iv http://www.bezier.ru http://bezier.googlecode.com ___ Flashcoders mailing

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Paul Andrews
- Original Message - From: Merrill, Jason [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, March 11, 2008 1:53 PM Subject: RE: [Flashcoders] calculating distance between two points Your teacher must be cringing! The square of the hypotenuse

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Kenneth Kawamoto
, March 11, 2008 1:53 PM Subject: RE: [Flashcoders] calculating distance between two points Your teacher must be cringing! The square of the hypotenuse equals the sum of the squares of the opposite two sides should be familar.. ;-) Math.sqrt ( Math.pow(Math.abs(x1-x2),2 )+Math.pow(Math.abs(y1

Re: [Flashcoders] calculating distance between two points

2008-03-11 Thread Cory Petosky
: Tuesday, March 11, 2008 1:53 PM Subject: RE: [Flashcoders] calculating distance between two points Your teacher must be cringing! The square of the hypotenuse equals the sum of the squares of the opposite two sides should be familar.. ;-) Math.sqrt ( Math.pow(Math.abs