MCPcopy Create free account
hub / github.com/GilesBathgate/RapCAD / evaluate

Method evaluate

src/module/offsetmodule.cpp:30–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30Node* OffsetModule::evaluate(const Context& ctx) const
31{
32 decimal a=1.0;
33 auto* amountVal=dynamic_cast<NumberValue*>(getParameterArgument(ctx,0));
34 if(amountVal)
35 a=amountVal->getNumber();
36
37 auto* n = new OffsetNode();
38 n->setAmount(a);
39 n->setChildren(ctx.getInputNodes());
40 return n;
41}

Callers

nothing calls this directly

Calls 4

getNumberMethod · 0.80
setAmountMethod · 0.80
getInputNodesMethod · 0.80
setChildrenMethod · 0.45

Tested by

no test coverage detected