Go to the source code of this file.
◆ EngMulDiv()
Definition at line 26 of file math.c.
30{
31 INT64 i64Multiplied, i64Result;
32
33
34 if (iDivisor == 0)
35 {
36
38 }
39
40
41 if (iDivisor < 0)
42 {
43 iMultiplicand = -iMultiplicand;
44 iDivisor = -iDivisor;
45 }
46
47
48 i64Multiplied =
Int32x32To64(iMultiplicand, iMultiplier);
49
50
51 if (i64Multiplied >= 0)
52 {
53 i64Multiplied += (iDivisor / 2);
54 }
55 else
56 {
57 i64Multiplied -= (iDivisor / 2);
58 }
59
60
61 i64Result = i64Multiplied / iDivisor;
62
63
65 {
67 }
68
69
71 {
73 }
74
75 return (
INT)i64Result;
76}
#define Int32x32To64(a, b)
Referenced by IntCalculateThumb(), IntGdiSetMapMode(), IntPaintDesktop(), PATH_Ellipse(), and PATH_RoundRect().