MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / shift_range

Function shift_range

Exercises/Modules/Chapter 09/Soln9_03.cpp:60–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60std::span<double> shift_range(std::span<double> data, double delta)
61{
62 for (size_t i {}; i < data.size(); ++i)
63 data[i] += delta;
64 return data;
65}
66
67std::optional<double> largest(std::span<const double> data)
68{

Callers 1

normalize_rangeFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected