Skip to content

Commit 3a11ed5

Browse files
committed
.
1 parent 6239c86 commit 3a11ed5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CImg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6703,8 +6703,8 @@ namespace cimg_library {
67036703
// This function is used by drawing methods, to get coherent rounded primitive coordinates.
67046704
// Beware, 'b' must be strictly positive!
67056705
template<typename T, typename t>
6706-
T inline round_div(const T a, const t b, const t hb) {
6707-
return b==1?a:a>=0?(a + hb)/b:-(hb - 1 - a)/b;
6706+
t inline round_div(const T a, const t b, const t hb) {
6707+
return (t)(b==1?a:a>=0?(a + hb)/b:-(hb - 1 - a)/b);
67086708
}
67096709
#define cimg_rd(a,b,c) cimg::round_div((cimg_long)a*b,c,h##c)
67106710

0 commit comments

Comments
 (0)