mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
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
20 lines
583 B
C++
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);
|
|
}
|
|
|
|
} |