[poincare] Enbale to evaluate expression in degrees or radian

Change-Id: I8b08e7fa93431817559a594a1ea03d4414f0c830
This commit is contained in:
Émilie Feral
2017-02-01 16:07:56 +01:00
parent 8d30d3fd0a
commit 42e4cf408d
55 changed files with 211 additions and 193 deletions

View File

@@ -257,7 +257,7 @@ Expression * Integer::clone() const {
return clone;
}
float Integer::approximate(Context& context) const {
float Integer::approximate(Context& context, AngleUnit angleUnit) const {
union {
uint32_t uint_result;
float float_result;
@@ -308,8 +308,8 @@ float Integer::approximate(Context& context) const {
return float_result;
}
Expression * Integer::evaluate(Context& context) const {
return new Float(approximate(context));
Expression * Integer::evaluate(Context& context, AngleUnit angleUnit) const {
return new Float(approximate(context, angleUnit));
}
Expression::Type Integer::type() const {