mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Make the fcs extension compile without C++11
This commit is contained in:
parent
01bc6b233a
commit
3d4a94a264
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "ace_common.h"
|
||||
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
|
||||
#include <math.h>
|
||||
@ -113,9 +113,11 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) {
|
||||
double distance = std::stod(argStrings[3]);
|
||||
|
||||
double result = getSolution(initSpeed, airFriction, angleTarget, distance);
|
||||
std::string resultString = std::to_string(result);
|
||||
|
||||
strcpy(output, resultString.c_str());
|
||||
std::stringstream sstream;
|
||||
sstream << result;
|
||||
|
||||
strcpy(output, sstream.str().c_str());
|
||||
output[outputSize - 1] = '\0';
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user