Skip to content

Commit 9d00686

Browse files
committed
backup implementation of Round for windows platforms
1 parent 2d634d3 commit 9d00686

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libImaging/Convert.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
#define L(rgb)\
5050
((INT32) (rgb)[0]*299 + (INT32) (rgb)[1]*587 + (INT32) (rgb)[2]*114)
5151

52+
#ifndef round
53+
double round(double x) {
54+
return floor(x+0.5);
55+
}
56+
#endif
57+
5258
/* ------------------- */
5359
/* 1 (bit) conversions */
5460
/* ------------------- */

0 commit comments

Comments
 (0)