NumCpp  2.18.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
fmod.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <cmath>
31
33#include "NumCpp/NdArray.hpp"
34
35namespace nc
36{
37 //============================================================================
38 // Method Description:
48 template<typename dtype, std::enable_if_t<std::is_integral_v<dtype>, int> = 0>
49 dtype fmod(dtype inValue1, dtype inValue2) noexcept
50 {
51 return inValue1 % inValue2;
52 }
53
54 //============================================================================
55 // Method Description:
65 template<typename dtype, std::enable_if_t<std::is_floating_point_v<dtype>, int> = 0>
66 dtype fmod(dtype inValue1, dtype inValue2) noexcept
67 {
68 return std::fmod(inValue1, inValue2);
69 }
70
71 //============================================================================
72 // Method Description:
82 template<typename dtype>
83 NdArray<dtype> fmod(const NdArray<dtype>& inArray1, const NdArray<dtype>& inArray2)
84 {
85 return inArray1 % inArray2;
86 }
87} // namespace nc
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:135
Definition Cartesian.hpp:39
dtype fmod(dtype inValue1, dtype inValue2) noexcept
Definition fmod.hpp:49