Using Point class?
import flash.geom.Point;
var p0:Point = new Point(0, 0);
var p1:Point = new Point(1, Math.sqrt(3));
var nDistance:Number = Point.distance(p0, p1);
trace(nDistance); // Output: 2
_____
Jim Hayes wrote:
I think there may be an inbuilt method in flash, mind you, 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 points with different x
and y values? I know it is some simple math formula - I just don't know
it....
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders