Commit 4f87a316 authored by Albert Astals Cid's avatar Albert Astals Cid

xpdf303: Add splashAvg

parent 64cf42f8
...@@ -69,6 +69,14 @@ static inline int splashRound(SplashCoord x) { ...@@ -69,6 +69,14 @@ static inline int splashRound(SplashCoord x) {
#endif #endif
} }
static inline SplashCoord splashAvg(SplashCoord x, SplashCoord y) {
#if USE_FIXEDPOINT
return FixedPoint::avg(x, y);
#else
return 0.5 * (x + y);
#endif
}
static inline SplashCoord splashSqrt(SplashCoord x) { static inline SplashCoord splashSqrt(SplashCoord x) {
#if USE_FIXEDPOINT #if USE_FIXEDPOINT
return FixedPoint::sqrt(x); return FixedPoint::sqrt(x);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment