MCPcopy Create free account
hub / github.com/PX4/eigen / areApproxAbs

Function areApproxAbs

test/packetmath.cpp:38–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38template<typename Scalar> bool areApproxAbs(const Scalar* a, const Scalar* b, int size, const typename NumTraits<Scalar>::Real& refvalue)
39{
40 for (int i=0; i<size; ++i)
41 {
42 if (!isApproxAbs(a[i],b[i],refvalue))
43 {
44 std::cout << "ref: [" << Map<const Matrix<Scalar,1,Dynamic> >(a,size) << "]" << " != vec: [" << Map<const Matrix<Scalar,1,Dynamic> >(b,size) << "]\n";
45 return false;
46 }
47 }
48 return true;
49}
50
51template<typename Scalar> bool areApprox(const Scalar* a, const Scalar* b, int size)
52{

Callers 1

packetmathFunction · 0.85

Calls 1

isApproxAbsFunction · 0.85

Tested by

no test coverage detected