1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #15217 from elatkin:15163_gapi_std_math

This commit is contained in:
Alexander Alekhin
2019-08-12 09:41:11 +00:00
3 changed files with 16 additions and 13 deletions
+4 -2
View File
@@ -8,6 +8,8 @@
#ifndef OPENCV_GAPI_CORE_HPP
#define OPENCV_GAPI_CORE_HPP
#include <math.h>
#include <utility> // std::tuple
#include <opencv2/imgproc.hpp>
@@ -392,8 +394,8 @@ namespace core {
{
GAPI_Assert(fx != 0. && fy != 0.);
return in.withSize
(Size(static_cast<int>(std::round(in.size.width * fx)),
static_cast<int>(std::round(in.size.height * fy))));
(Size(static_cast<int>(round(in.size.width * fx)),
static_cast<int>(round(in.size.height * fy))));
}
}
};
@@ -8,7 +8,7 @@
#ifndef OPENCV_GAPI_OWN_SATURATE_HPP
#define OPENCV_GAPI_OWN_SATURATE_HPP
#include <cmath>
#include <math.h>
#include <limits>
#include <type_traits>
@@ -79,10 +79,10 @@ static inline DST saturate(SRC x, R round)
}
// explicit suffix 'd' for double type
inline double ceild(double x) { return std::ceil(x); }
inline double floord(double x) { return std::floor(x); }
inline double roundd(double x) { return std::round(x); }
inline double rintd(double x) { return std::rint(x); }
inline double ceild(double x) { return ceil(x); }
inline double floord(double x) { return floor(x); }
inline double roundd(double x) { return round(x); }
inline double rintd(double x) { return rint(x); }
} //namespace own
} //namespace gapi