mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 11:39:58 +02:00
[poincare] Fix bug
Change-Id: I6232b050f2f1db69c326a3200b4d6ed11856c04b
This commit is contained in:
@@ -88,7 +88,7 @@ Expression * Trigonometry::immediateSimplifyInverseFunction(Expression * e, Cont
|
||||
float trigoOp = e->operand(0)->operand(0)->approximate<float>(context, angleUnit);
|
||||
float pi = angleUnit == Expression::AngleUnit::Radian ? M_PI : 180;
|
||||
if ((e->type() == Expression::Type::ArcCosine && trigoOp >= 0.0f && trigoOp <= pi) ||
|
||||
(e->type() == Expression::Type::ArcSine && trigoOp >= -M_PI/2.0f && trigoOp <= pi/2.0f) ||
|
||||
(e->type() == Expression::Type::ArcSine && trigoOp >= -pi/2.0f && trigoOp <= pi/2.0f) ||
|
||||
(e->type() == Expression::Type::ArcTangent && trigoOp >= -pi/2.0f && trigoOp <= pi/2.0f)) {
|
||||
return e->replaceWith(const_cast<Expression *>(e->operand(0)->operand(0)), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user