Changeset 81b1db8 in mainline for uspace/lib/softrend/filter.c
- Timestamp:
- 2018-03-26T15:26:27Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 41bbab6
- Parents:
- fd57745c
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-26 15:21:43)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-26 15:26:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/softrend/filter.c
rfd57745c r81b1db8 39 39 40 40 41 static long round(double val)41 static long _round(double val) 42 42 { 43 43 return val > 0 ? (long) (val + 0.5) : (long) (val - 0.5); 44 44 } 45 45 46 static long floor(double val)46 static long _floor(double val) 47 47 { 48 48 long lval = (long) val; … … 52 52 } 53 53 54 static long ceil(double val)54 static long _ceil(double val) 55 55 { 56 56 long lval = (long) val; … … 79 79 pixelmap_extend_t extend) 80 80 { 81 return pixelmap_get_extended_pixel(pixmap, round(x),round(y), extend);81 return pixelmap_get_extended_pixel(pixmap, _round(x), _round(y), extend); 82 82 } 83 83 … … 85 85 pixelmap_extend_t extend) 86 86 { 87 long x1 = floor(x);88 long x2 = ceil(x);89 long y1 = floor(y);90 long y2 = ceil(y);87 long x1 = _floor(x); 88 long x2 = _ceil(x); 89 long y1 = _floor(y); 90 long y2 = _ceil(y); 91 91 92 92 if (y1 == y2 && x1 == x2) {
Note:
See TracChangeset
for help on using the changeset viewer.