mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 06:10:31 +01:00
[poincare] Trigonometry: missing clone
This commit is contained in:
@@ -30,7 +30,7 @@ float Trigonometry::characteristicXRange(const Expression & e, Context & context
|
||||
assert(d == 1);
|
||||
/* To compute a, the slope of the expression child(0), we compute the
|
||||
* derivative of child(0) for any x value. */
|
||||
Poincare::Derivative derivative(e.childAtIndex(0), Float<float>(1.0f));
|
||||
Poincare::Derivative derivative(e.childAtIndex(0).clone(), Float<float>(1.0f));
|
||||
float a = derivative.approximateToScalar<float>(context, angleUnit);
|
||||
float pi = angleUnit == Preferences::AngleUnit::Radian ? M_PI : 180.0f;
|
||||
return 2.0f*pi/std::fabs(a);
|
||||
|
||||
Reference in New Issue
Block a user