NumCpp
1.0
A C++ implementation of the Python Numpy library
sqr.hpp
Go to the documentation of this file.
1
#pragma once
30
31
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
32
33
namespace
nc
34
{
35
namespace
utils
36
{
37
//============================================================================
44
template
<
typename
dtype>
45
constexpr dtype
sqr
(dtype inValue) noexcept
46
{
47
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(dtype);
48
49
return
inValue * inValue;
50
}
51
}
52
}
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition:
StaticAsserts.hpp:51
nc
Definition:
Coordinate.hpp:45
nc::utils::sqr
constexpr dtype sqr(dtype inValue) noexcept
Definition:
sqr.hpp:45
include
NumCpp
Utils
sqr.hpp
Generated by
1.8.17