diff options
author | Karan Dwivedi <karan.dwivedi42@gmail.com> | 2016-09-14 15:08:38 +0300 |
---|---|---|
committer | Karan Dwivedi <karan.dwivedi42@gmail.com> | 2016-09-14 15:08:38 +0300 |
commit | 46b219139d04821851e4b8de8cecd04025d42b76 (patch) | |
tree | 6a5f5428355221408159bb0e81268abf54442dbb | |
parent | aa635cfddb4cf53fd37841b7fc827f48343cfee7 (diff) |
Cast int to float
-rwxr-xr-x | generic/image.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/image.c b/generic/image.c index f30fcad..1f5163b 100755 --- a/generic/image.c +++ b/generic/image.c @@ -2116,9 +2116,9 @@ static inline void image_(drawPixel)(THTensor *output, int y, int x, THTensor_(set3d)(output, 1, y, x, cg); THTensor_(set3d)(output, 2, y, x, cb); #else - THTensor_(set3d)(output, 0, y, x, cr / 255); - THTensor_(set3d)(output, 1, y, x, cg / 255); - THTensor_(set3d)(output, 2, y, x, cb / 255); + THTensor_(set3d)(output, 0, y, x, cr / 255.0f); + THTensor_(set3d)(output, 1, y, x, cg / 255.0f); + THTensor_(set3d)(output, 2, y, x, cb / 255.0f); #endif } static inline void image_(drawChar)(THTensor *output, int x, int y, unsigned char c, int size, |