OGLplus
(0.59.0)
a C++ wrapper for rendering APIs
eagine
vect
sqrt.hpp
Go to the documentation of this file.
1
#ifndef EAGINE_VECT_SQRT_HPP
9
#define EAGINE_VECT_SQRT_HPP
10
11
#include "
data.hpp
"
12
#include <cmath>
13
14
namespace
eagine::vect {
15
16
template
<
typename
T,
int
N,
bool
V>
17
struct
sqrt {
18
19
static
auto
apply(data_t<T, N, V> v) noexcept -> data_t<T, N, V> {
20
for
(
int
i = 0; i < N; ++i) {
21
using
std::sqrt;
22
v[i] = T(sqrt(v[i]));
23
}
24
return
v;
25
}
26
};
27
28
}
// namespace eagine::vect
29
30
#endif // EAGINE_VECT_SQRT_HPP
data.hpp
Copyright © 2015-2021
Matúš Chochlík
.
<
chochlik -at -gmail.com
>
Documentation generated on Tue Apr 13 2021 by
Doxygen
(version 1.8.17).