Subject: Distances 2004-03-20 - By Harper, Chris
Back Thanks jayson. Yeah, it works :)
-- --Original Message-- -- From: Jayson K Hanes [mailto:jayson@(protected)] Sent: Saturday, March 20, 2004 1:08 PM To: flashcomm@(protected) Subject: RE: [FlashComm] Distances
A VERY simplified quick translation to AS.. (seems to work? I need to test some coordinates next)..
lat1(;lon1?2.3; lat2 ;lon2?0.0; var miles; var dlon; var dlat; var a; var c; var factor; factor = (2*Math.PI)/180 lat1 = lat1 * factor; lon1 = lon1 * factor; lat2 = lat2 * factor; lon2 = lon2 * factor; dlon = lon2 - lon1; dlat = lat2 - lat1; a = (Math.sin(dlat/2))*(Math.sin(dlat/2)) + Math.cos(lat1) * Math.cos(lat2) * (Math.sin(dlon/2))*(Math.sin(dlon/2)); c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a) ); miles = 3961 * c; trace(miles);
....Jayson
-- --Original Message-- -- From: Harper, Chris [mailto:charper@(protected)] Sent: Sat 3/20/2004 1:12 PM To: flashcomm@(protected) Cc: Subject: RE: [FlashComm] Distances
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: flashcomm-unsubscribe@(protected) For additional commands, e-mail: flashcomm-help@(protected)
|
|