fixed negative sidereal degrees for Pisces
This commit is contained in:
parent
839addec29
commit
4b070493e6
1 changed files with 4 additions and 2 deletions
|
|
@ -122,7 +122,8 @@ SL.Astro = (function() {
|
|||
if ( sidereal == 1 ) {
|
||||
deg -= 24.11722222222; // degrees difference between tropical and sidereal
|
||||
}
|
||||
if ( deg >= 360.0 ) deg = Math.abs(deg - 360.0);
|
||||
if ( deg >= 360.0 ) deg -= 360.0;
|
||||
if ( deg < 0 ) deg += 360.0;
|
||||
var zod = getZodiac(deg, 0);
|
||||
var diff = ( zod.sign - 1 ) * 30.0;
|
||||
var degrees = deg - diff;
|
||||
|
|
@ -142,7 +143,8 @@ SL.Astro = (function() {
|
|||
if ( sidereal == 1 ) {
|
||||
deg -= 24.11722222222; // degrees difference between tropical and sidereal
|
||||
}
|
||||
if ( deg >= 360.0 ) deg = Math.abs(deg - 360.0);
|
||||
if ( deg >= 360.0 ) deg -= 360.0;
|
||||
if ( deg < 0 ) deg += 360.0;
|
||||
deg += 0.0001; // added to compensate rounding, resulting in 0° to 29.99° being Aries instead of 0° to 30°
|
||||
var obj = {
|
||||
sign: Math.ceil(deg / 30),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue