MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / compareNumber

Function compareNumber

lib/macro/macro-condition-variable.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static bool compareNumber(const Variable &var, double value, bool less)
41{
42 auto varValue = var.DoubleValue();
43 if (!varValue.has_value()) {
44 return false;
45 }
46 if (less) {
47 return varValue < value;
48 }
49 return varValue > value;
50}
51
52bool MacroConditionVariable::Compare(const Variable &var) const
53{

Callers 1

CheckConditionMethod · 0.70

Calls 1

DoubleValueMethod · 0.45

Tested by

no test coverage detected