MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / norm

Function norm

Engine/CoonsRegularization.cpp:256–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254} // getRightPointAt
255
256static double
257norm(const Point& z0,
258 const Point& c0,
259 const Point& c1,
260 const Point& z1)
261{
262 double fuzz2 = 1000. * std::numeric_limits<double>::epsilon() * 1000. * std::numeric_limits<double>::epsilon();
263 double p1_p1p2Norm = (c0.x - z0.x) * (c0.x - z0.x) + (c0.y - z0.y) * (c0.y - z0.y);
264 double p1_p2p1Norm = (c1.x - z0.x) * (c1.x - z0.x) + (c1.y - z0.y) * (c1.y - z0.y);
265 double p1_p2Norm = (z1.x - z0.x) * (z1.x - z0.x) + (z1.y - z0.y) * (z1.y - z0.y);
266
267 return fuzz2 * std::max( p1_p1p2Norm, std::max(p1_p2p1Norm, p1_p2Norm) );
268}
269
270static Point
271predir(const BezierCPs& cps,

Callers 3

predirFunction · 0.85
postdirFunction · 0.85
dirVectFunction · 0.85

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected