webdial

Incomplete JS port of moondial.
git clone https://code.literati.org/webdial.git
Log | Files | Refs

commit 53b72d399d048628f5d0ae8f7425eed0042ca5e4
parent f7f078c303209a257e9160a0db63be64190edfb1
Author: Sean Lynch <seanl@literati.org>
Date:   Thu,  8 Sep 2011 00:02:32 -0700

Make ecl_to_equ a public function.

Diffstat:
Msun.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sun.js b/sun.js @@ -55,7 +55,7 @@ function Sun() { * Right accension in radians * Declination in radians */ - function ecl_to_equ(lon, lat, obl) { + this.ecl_to_equ = function(lon, lat, obl) { var cose = Math.cos(obl); var sine = Math.sin(obl); var sinl = Math.sin(lon); @@ -63,7 +63,7 @@ function Sun() { Math.cos(lon))); var dec = Math.asin(Math.sin(lon) * cose + Math.cos(lat) * sine * sinl); return {"ra": ra, "dec": dec}; - } + }; this.equ_to_geo = function(ra, dec, st) { var lon = r_to_d(ra - st);