summaryrefslogtreecommitdiffstats
path: root/src/raster/ftmisc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/raster/ftmisc.h')
-rw-r--r--src/raster/ftmisc.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/raster/ftmisc.h b/src/raster/ftmisc.h
index 7773924..703155a 100644
--- a/src/raster/ftmisc.h
+++ b/src/raster/ftmisc.h
@@ -115,6 +115,27 @@
return ( s > 0 ) ? d : -d;
}
+
+ static FT_Long
+ FT_MulDiv_No_Round( FT_Long a,
+ FT_Long b,
+ FT_Long c )
+ {
+ FT_Int s;
+ FT_Long d;
+
+
+ s = 1;
+ if ( a < 0 ) { a = -a; s = -1; }
+ if ( b < 0 ) { b = -b; s = -s; }
+ if ( c < 0 ) { c = -c; s = -s; }
+
+ d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c
+ : 0x7FFFFFFFL );
+
+ return ( s > 0 ) ? d : -d;
+ }
+
#endif /* __FTMISC_H__ */