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
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
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
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
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
: [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
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
, 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
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
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 =
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
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
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
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
- 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
, 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
: 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
17 matches
Mail list logo