diff --git a/modules/core/include/opencv2/core/types.hpp b/modules/core/include/opencv2/core/types.hpp index ef9ab59383..4d04bef90a 100644 --- a/modules/core/include/opencv2/core/types.hpp +++ b/modules/core/include/opencv2/core/types.hpp @@ -1192,7 +1192,7 @@ _Tp Point_<_Tp>::dot(const Point_& pt) const template inline double Point_<_Tp>::ddot(const Point_& pt) const { - return (double)x*pt.x + (double)y*pt.y; + return (double)x*(double)(pt.x) + (double)y*(double)(pt.y); } template inline