flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Re: Workers and Speed
Date Wed, 03 Aug 2016 22:43:56 GMT
Hi,

Not looked at the code in detail yet. Probably not a big deal but a small simple win is to
move Math.PI/180 into a variable and do the calculation once rather than calculating 4 x times
around the loop.

> 																lon1 = tempArray[i].longitude*Math.PI/180;
> 																lon2 = tempArray[j].longitude*Math.PI/180;
> 																lat1 = tempArray[i].latitude*Math.PI/180;
> 																lat2 = tempArray[j].latitude*Math.PI/180;

Thanks,
Justin
Mime
View raw message