Files
Upsilon/poincare/src/unreal.cpp
Gabriel Ozouf c65687e9f6 [poincare] Implemented didDerivate methods for Number, Symbol and Addition
Number's subclasses, with the exception of Undefined and Unreal, derive as zero. Symbols derive as expected. Derivation propagates as expected on additions.

Change-Id: Icedbb1dfac8099347a19c14bf2537011b2e8b199
2020-11-04 14:45:34 +01:00

20 lines
583 B
C++

#include <poincare/unreal.h>
#include <poincare/layout_helper.h>
#include <algorithm>
extern "C" {
#include <math.h>
#include <string.h>
}
namespace Poincare {
Layout UnrealNode::createLayout(Preferences::PrintFloatMode floatDisplayMode, int numberOfSignificantDigits) const {
return LayoutHelper::String(Unreal::Name(), Unreal::NameSize()-1);
}
int UnrealNode::serialize(char * buffer, int bufferSize, Preferences::PrintFloatMode floatDisplayMode, int numberOfSignificantDigits) const {
return std::min<int>(strlcpy(buffer, Unreal::Name(), bufferSize), bufferSize - 1);
}
}