(split from Astrognome)Added planetary distance to GsweAspectData structure
This commit is contained in:
parent
e5a12923fa
commit
b446037e2f
@ -610,18 +610,17 @@ static gboolean
|
||||
find_aspect(gpointer aspect_p, GsweAspectInfo *aspect_info, GsweAspectData *aspect_data)
|
||||
{
|
||||
GsweAspect aspect = GPOINTER_TO_INT(aspect_p);
|
||||
gdouble distance,
|
||||
diff,
|
||||
gdouble diff,
|
||||
planet_orb,
|
||||
aspect_orb;
|
||||
|
||||
distance = fabs(aspect_data->planet1->position - aspect_data->planet2->position);
|
||||
aspect_data->distance = fabs(aspect_data->planet1->position - aspect_data->planet2->position);
|
||||
|
||||
if (distance > 180.0) {
|
||||
distance = 360.0 - distance;
|
||||
if (aspect_data->distance > 180.0) {
|
||||
aspect_data->distance = 360.0 - aspect_data->distance;
|
||||
}
|
||||
|
||||
diff = fabs(aspect_info->size - distance);
|
||||
diff = fabs(aspect_info->size - aspect_data->distance);
|
||||
planet_orb = fmin(aspect_data->planet1->planet_info->orb, aspect_data->planet2->planet_info->orb);
|
||||
aspect_orb = fmax(1.0, planet_orb - aspect_info->orb_modifier);
|
||||
|
||||
|
@ -75,6 +75,7 @@ typedef struct {
|
||||
GswePlanetData *planet1;
|
||||
GswePlanetData *planet2;
|
||||
GsweAspect aspect;
|
||||
gdouble distance;
|
||||
gdouble difference;
|
||||
GsweAspectInfo *aspect_info;
|
||||
} GsweAspectData;
|
||||
|
Loading…
Reference in New Issue
Block a user