MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / IsSame

Function IsSame

include/behaviortree_cpp/scripting/operators.hpp:303–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301
302template <typename T>
303bool IsSame(const T& lv, const T& rv)
304{
305 if constexpr(std::is_same_v<double, T>)
306 {
307 constexpr double EPS = static_cast<double>(std::numeric_limits<float>::epsilon());
308 return std::abs(lv - rv) <= EPS;
309 }
310 else
311 {
312 return (lv == rv);
313 }
314}
315
316struct ExprComparison : ExprBase
317{

Callers 1

evaluateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected