MCPcopy Create free account
hub / github.com/Profactor/cv-plot / step

Function step

CvPlot/ext/catch2/inc/catch.hpp:11380–11389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11378
11379template <typename FP>
11380FP step(FP start, FP direction, uint64_t steps) {
11381 for (uint64_t i = 0; i < steps; ++i) {
11382#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
11383 start = Catch::nextafter(start, direction);
11384#else
11385 start = std::nextafter(start, direction);
11386#endif
11387 }
11388 return start;
11389}
11390
11391// Performs equivalent check of std::fabs(lhs - rhs) <= margin
11392// But without the subtraction to allow for INFINITY in comparison

Callers 1

describeMethod · 0.85

Calls 1

nextafterFunction · 0.85

Tested by

no test coverage detected