Skip to content

Commit

Permalink
simplifying AdaptiveContouring code to simplify Windows installation
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoleski committed Jan 25, 2024
1 parent e2c70fa commit 03d7858
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions source/AdaptiveContouring/adaptive_contour.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/* Revision RP 02-02-18 */
/* Revision RP 24-02-18 */
/* Revision RP 15-11-18 */
/* Revision RP 25-01-24 ifndef M_LN2 */


#include <math.h>
Expand All @@ -36,6 +37,10 @@ typedef enum {FALSE,TRUE} boolean;

#define BIGG 1e37

#ifndef M_LN2
#define M_LN2 0.693147180559945309417
#endif

typedef struct region {
int level;
FLOAT x1,x2;
Expand Down
13 changes: 8 additions & 5 deletions source/AdaptiveContouring/binext_adap.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/* RP 02-02-18 */
/* RP 16-03-18 */
/* RP 15-11-18 */
/* RP 25-01-24 ifndef M_PI; sin/cos */

#define _GNU_SOURCE
#include <math.h>
Expand All @@ -26,6 +27,10 @@ typedef enum {FALSE,TRUE} boolean;

#define BIGG 1e37

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

typedef struct ptlist {
FLOAT x1,x2;
int min_lvl;
Expand Down Expand Up @@ -182,11 +187,9 @@ FLOAT magt_binext(FLOAT t, FLOAT t0, FLOAT tE, FLOAT alpha, FLOAT u0,

p = (t-t0)/tE;

#ifdef __APPLE__
__sincos(alpha,&sa,&ca);
#else
sincos(alpha,&sa,&ca);
#endif
sa = sin(alpha);
ca = cos(alpha);

y1 = p*ca-u0*sa;
y2 = p*sa+u0*ca;

Expand Down
2 changes: 1 addition & 1 deletion source/MulensModel/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.19.4"
__version__ = "2.20.0"

0 comments on commit 03d7858

Please sign in to comment.