Commit a7eed598 authored by Alexander David Hellwig's avatar Alexander David Hellwig
Browse files

Fix: Abs command defaults to abs(float arg) on Windows, abs(int arg) on Linux...

Fix: Abs command defaults to abs(float arg) on Windows, abs(int arg) on Linux -> use std::abs(float arg)
parent b89da6df
......@@ -85,7 +85,7 @@ public class MathAbsCommand extends MathCommand {
valueListString += ExecuteMethodGenerator.generateExecuteCode(mathExpressionSymbol, new ArrayList<String>());
//OctaveHelper.getCallOctaveFunction(mathExpressionSymbol, "sum","Double", valueListString));
List<MathMatrixAccessSymbol> newMatrixAccessSymbols = new ArrayList<>();
MathStringExpression stringExpression = new MathStringExpression("abs"+valueListString,mathMatrixNameExpressionSymbol.getMathMatrixAccessOperatorSymbol().getMathMatrixAccessSymbols());
MathStringExpression stringExpression = new MathStringExpression("std::abs"+valueListString,mathMatrixNameExpressionSymbol.getMathMatrixAccessOperatorSymbol().getMathMatrixAccessSymbols());
newMatrixAccessSymbols.add(new MathMatrixAccessSymbol(stringExpression));
mathMatrixNameExpressionSymbol.getMathMatrixAccessOperatorSymbol().setMathMatrixAccessSymbols(newMatrixAccessSymbols);
......
......@@ -12,7 +12,7 @@ void init()
}
void execute()
{
double a = (abs(-1));
double a = (std::abs(-1));
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment