MCPcopy Create free account
hub / github.com/cinder/Cinder / subPathHelper

Function subPathHelper

test/unit/src/Path2dTest.cpp:11–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9using namespace std;
10
11bool subPathHelper( const Path2d &p, float start, float end )
12{
13 float targetLength = ( end - start ) * p.calcLength();
14 Path2d sub = p.getSubPath( p.calcNormalizedTime( start, false ), p.calcNormalizedTime( end, false ) );
15 float subLength = sub.calcLength();
16 return abs( targetLength - subLength ) <= (0.01f * targetLength);
17}
18
19TEST_CASE("Path2d")
20{

Callers 1

Path2dTest.cppFile · 0.85

Calls 4

absFunction · 0.85
getSubPathMethod · 0.80
calcNormalizedTimeMethod · 0.80
calcLengthMethod · 0.45

Tested by

no test coverage detected