Synchronize common scilab examples with other languages
This commit is contained in:
parent
a41efbd0f7
commit
ea634d54a5
4 changed files with 7 additions and 8 deletions
|
|
@ -9,7 +9,7 @@ double average(std::vector<int> v) {
|
|||
return std::accumulate(v.begin(),v.end(),0.0)/v.size();
|
||||
}
|
||||
|
||||
std::vector<double> half(const std::vector<double> v) {
|
||||
std::vector<double> half(const std::vector<double>& v) {
|
||||
std::vector<double> w(v);
|
||||
for (unsigned int i=0; i<w.size(); i++)
|
||||
w[i] /= 2.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue