MbDCode repo renamed to OndselSolver. Several *.asmt files working.
This commit is contained in:
24
MbDCode/Sine.cpp
Normal file
24
MbDCode/Sine.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "Sine.h"
|
||||
#include "Cosine.h"
|
||||
|
||||
using namespace MbD;
|
||||
|
||||
MbD::Sine::Sine(Symsptr arg) : FunctionX(arg)
|
||||
{
|
||||
}
|
||||
|
||||
double MbD::Sine::getValue()
|
||||
{
|
||||
return std::sin(xx->getValue());
|
||||
}
|
||||
|
||||
Symsptr MbD::Sine::differentiateWRTx()
|
||||
{
|
||||
return std::make_shared<Cosine>(xx);
|
||||
}
|
||||
|
||||
std::ostream& MbD::Sine::printOn(std::ostream& s) const
|
||||
{
|
||||
s << "sin(" << xx << ")";
|
||||
return s;
|
||||
}
|
||||
Reference in New Issue
Block a user