Kaydet (Commit) e14e818a authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

Polynomial curve equation: show "x^1" as "x"

Change-Id: I86ff9b5cc2f3fa60533794ed9ecd1175924c1d25
üst bb45bdf3
...@@ -188,11 +188,18 @@ OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation( ...@@ -188,11 +188,18 @@ OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation(
aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, std::abs( aValue ) ) ); aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, std::abs( aValue ) ) );
if(i > 0) if(i > 0)
{
if (i == 1)
{
aBuf.appendAscii( "x" );
}
else
{ {
aBuf.appendAscii( "x^" ); aBuf.appendAscii( "x^" );
aBuf.append(i); aBuf.append(i);
} }
} }
}
return aBuf.makeStringAndClear(); return aBuf.makeStringAndClear();
} }
......
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