MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / interp

Method interp

source/matplot/util/contourc.cpp:1357–1366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1355 }
1356
1357 XY QuadContourGenerator::interp(long point1, long point2,
1358 const double &level) const {
1359 assert(point1 >= 0 && point1 < _n && "Point index 1 out of bounds.");
1360 assert(point2 >= 0 && point2 < _n && "Point index 2 out of bounds.");
1361 assert(point1 != point2 && "Identical points");
1362 double fraction = (get_point_z(point2) - level) /
1363 (get_point_z(point2) - get_point_z(point1));
1364 return get_point_xy(point1) * fraction +
1365 get_point_xy(point2) * (1.0 - fraction);
1366 }
1367
1368 bool
1369 QuadContourGenerator::is_edge_a_boundary(const QuadEdge &quad_edge) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected