[poincare] Rename class ReelPart and its constructor

Reel => Real
This commit is contained in:
Ian Abbott
2017-10-04 11:50:17 +01:00
committed by Ecco
parent 23e22d34e7
commit 91542cedaa
3 changed files with 8 additions and 8 deletions

View File

@@ -5,9 +5,9 @@
namespace Poincare {
class ReelPart : public Function {
class RealPart : public Function {
public:
ReelPart();
RealPart();
Type type() const override;
Expression * cloneWithDifferentOperands(Expression ** newOperands,
int numberOfOperands, bool cloneOperands = true) const override;

View File

@@ -124,7 +124,7 @@ prediction95 { poincare_expression_yylval.expression = new PredictionInterval();
prediction { poincare_expression_yylval.expression = new ConfidenceInterval(); return FUNCTION; }
product { poincare_expression_yylval.expression = new Product(); return FUNCTION; }
quo { poincare_expression_yylval.expression = new DivisionQuotient(); return FUNCTION; }
re { poincare_expression_yylval.expression = new ReelPart(); return FUNCTION; }
re { poincare_expression_yylval.expression = new RealPart(); return FUNCTION; }
rem { poincare_expression_yylval.expression = new DivisionRemainder(); return FUNCTION; }
root { poincare_expression_yylval.expression = new NthRoot(); return FUNCTION; }
round { poincare_expression_yylval.expression = new Round(); return FUNCTION; }

View File

@@ -8,25 +8,25 @@ extern "C" {
namespace Poincare {
ReelPart::ReelPart() :
RealPart::RealPart() :
Function("re")
{
}
Expression::Type ReelPart::type() const {
Expression::Type RealPart::type() const {
return Type::ReelPart;
}
Expression * ReelPart::cloneWithDifferentOperands(Expression** newOperands,
Expression * RealPart::cloneWithDifferentOperands(Expression** newOperands,
int numberOfOperands, bool cloneOperands) const {
assert(newOperands != nullptr);
ReelPart * rp = new ReelPart();
RealPart * rp = new RealPart();
rp->setArgument(newOperands, numberOfOperands, cloneOperands);
return rp;
}
template<typename T>
Complex<T> ReelPart::templatedComputeComplex(const Complex<T> c) const {
Complex<T> RealPart::templatedComputeComplex(const Complex<T> c) const {
return Complex<T>::Float(c.a());
}