Skip to content
Snippets Groups Projects
Commit ab6ac019 authored by Erik Schnaubelt's avatar Erik Schnaubelt
Browse files

fix macros for C++ compilation

parent 777d3a44
No related branches found
No related tags found
No related merge requests found
......@@ -5,10 +5,10 @@
#include <string.h>
#ifdef _MSC_VER
#define EXPORT __declspec(dllexport)
#define LENGTH 33
#else
#define EXPORT
#endif
#define LENGTH 33
static const char* error = NULL;
......@@ -167,4 +167,4 @@ EXPORT int eval(const char* func,
error = "Unknown function";
return 0;
}
}
\ No newline at end of file
}
......@@ -78,7 +78,7 @@ EXPORT int eval(const char *func,
/* Mandatory constraint: 0.01 <= b <= 1 */
bi=B/Bc2;
bi=min(max(bi,Bmin),1);
bi=MIN(MAX(bi,Bmin),1);
/* Bordini's original fit: */
c = (1-degr) * c0 * pow((1-pow(ti,p)),alpha) * pow((1-pow(ti,2)),alpha);
......@@ -111,4 +111,4 @@ EXPORT int eval(const char *func,
error = "Unknown function";
return 0;
}
}
\ No newline at end of file
}
......@@ -80,13 +80,13 @@ EXPORT int eval(const char *func,
}
else {
ti=max(ti,tmin);
ti=MAX(ti,tmin);
Bc2 = Bc20 * (1-pow(ti,p));
/* Mandatory constraint: 0.01 <= b <= 1 */
bi=B/Bc2;
bi=min(max(bi,Bmin),1);
bi=MIN(MAX(bi,Bmin),1);
Sscaling = pow(1-pow((S/Smax),a), 0.5);
/* Bordini's original fit: */
......@@ -119,4 +119,4 @@ EXPORT int eval(const char *func,
error = "Unknown function";
return 0;
}
}
\ No newline at end of file
}
......@@ -72,13 +72,13 @@ EXPORT int eval(const char *func,
}
else {
ti=max(ti,tmin);
ti=MAX(ti,tmin);
Bc2 = Bc20 * (1-pow(ti,p));
/* Mandatory constraint: 0.01 <= b <= 1 */
bi=B/Bc2;
bi=min(max(bi,Bmin),1);
bi=MIN(MAX(bi,Bmin),1);
/* Bordini's original fit: */
c = (1-degr) * c0 * pow((1-pow(ti,p)),alpha) * pow((1-pow(ti,2)),alpha);
......@@ -110,4 +110,4 @@ EXPORT int eval(const char *func,
error = "Unknown function";
return 0;
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment