Convert cosd() function into a macro.

This commit is contained in:
Dianne Skoll
2024-03-19 16:26:07 -04:00
parent 97b53d5e40
commit 95523c8f10

View File

@@ -3684,11 +3684,8 @@ mean_december_solstice(double y)
} }
/* Cosine of an angle specified in degrees */ /* Cosine of an angle specified in degrees */
static double #define PI_BY_180 0.01745329251994329576923690768
cosd(double degrees) #define cosd(theta) cos( (theta) * PI_BY_180)
{
return cos((degrees / 180.0) * 3.14159265358979);
}
/* Astronomical Algorithms by Meeus, p. 179 /* Astronomical Algorithms by Meeus, p. 179
These weird periodic components refine the mean solstice/equinox dates These weird periodic components refine the mean solstice/equinox dates