MulDiv函数到底是用来干什么的啊?
MulDiv函数到底是用来干什么的啊? 问题点数:0、回复次数:5Top
1 楼DentistryDoctor(不在无聊中无奈,就在沉默中变态)回复于 2004-09-03 12:35:35 得分 0
The MulDiv function multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. The return value is rounded up or down to the nearest integer.
MulDiv(a,b,c)
=a*b/c;Top
2 楼bohut(●伯虎● )回复于 2004-09-03 12:45:32 得分 0
MulDiv
The MulDiv function multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. The return value is rounded up or down to the nearest integer.
int MulDiv(
int nNumber,
int nNumerator,
int nDenominator
);
Parameters
nNumber
[in] Multiplicand.
nNumerator
[in] Multiplier.
nDenominator
[in] Number by which the result of the multiplication (nNumber * nNumerator) is to be divided.
Return Values
If the function succeeds, the return value is the result of the multiplication and division. If either an overflow occurred or nDenominator was 0, the return value is –1.
Top
3 楼carbon107(<软件开发思想.h>)回复于 2004-09-03 13:35:07 得分 0
先乘,再除Top
4 楼kevin0182(雨亭)回复于 2004-09-03 14:00:51 得分 0
#define CALCX(x) (MulDiv(x, GetDeviceCaps(m_DC.m_hDC, LOGPIXELSX), 72))
这是干什么用的啊?是什么意思?Top
5 楼jazy()回复于 2004-09-03 14:31:13 得分 0
算字体大小的吧?一英寸有72个点,这里应该是在是算x个点折合多少象素。Top




