NumCpp
2.9.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
sqr.hpp
Go to the documentation of this file.
1
#pragma once
29
30
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
31
32
namespace
nc
33
{
34
namespace
utils
35
{
36
//============================================================================
43
template
<
typename
dtype>
44
constexpr dtype
sqr
(dtype inValue) noexcept
45
{
46
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(dtype);
47
48
return
inValue * inValue;
49
}
50
}
// namespace utils
51
}
// namespace nc
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition:
StaticAsserts.hpp:49
nc::utils::sqr
constexpr dtype sqr(dtype inValue) noexcept
Definition:
sqr.hpp:44
nc
Definition:
Coordinate.hpp:45
include
NumCpp
Utils
sqr.hpp
Generated by
1.9.1