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

Function scale_range

Examples/NoModules/Chapter 08/Ex8_13.cpp:78–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78double* scale_range(double data[], size_t count, double divisor)
79{
80 if (!divisor) return data; // Do nothing for a zero divisor
81
82 for (size_t i{}; i < count; ++i)
83 data[i] /= divisor;
84 return data;
85}
86
87double* normalize_range(double data[], size_t count)
88{

Callers 1

normalize_rangeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected