Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
60
std::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
67
std::optional<double> largest(std::span<const double> data)
68
{
Callers
1
normalize_range
Function · 0.70
Calls
1
size
Method · 0.45
Tested by
no test coverage detected