Bug 670338 - Add double overload to NSToIntRound to stop build warnings; r=roc

This commit is contained in:
Ed Morley 2011-07-11 09:14:12 -04:00
parent 5802023c26
commit 2732bc62de

View File

@ -413,6 +413,11 @@ inline PRInt32 NSToIntRound(float aValue)
return NS_lroundf(aValue);
}
inline PRInt32 NSToIntRound(double aValue)
{
return NS_lround(aValue);
}
inline PRInt32 NSToIntRoundUp(float aValue)
{
return PRInt32(NS_floorf(aValue + 0.5f));