mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 907901. Remove NS_lround from rect.h. r=Bas
This commit is contained in:
parent
418335dc08
commit
6e351b8e9b
@ -10,7 +10,8 @@
|
||||
#include "BaseMargin.h"
|
||||
#include "Point.h"
|
||||
#include "Tools.h"
|
||||
#include "nsMathUtils.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
@ -108,10 +109,10 @@ typedef RectTyped<UnknownUnits> Rect;
|
||||
template<class units>
|
||||
IntRectTyped<units> RoundedToInt(const RectTyped<units>& aRect)
|
||||
{
|
||||
return IntRectTyped<units>(NS_lround(aRect.x),
|
||||
NS_lround(aRect.y),
|
||||
NS_lround(aRect.width),
|
||||
NS_lround(aRect.height));
|
||||
return IntRectTyped<units>(int32_t(floorf(aRect.x + 0.5f)),
|
||||
int32_t(floorf(aRect.y + 0.5f)),
|
||||
int32_t(floorf(aRect.width + 0.5f)),
|
||||
int32_t(floorf(aRect.height + 0.5f)));
|
||||
}
|
||||
|
||||
template<class units>
|
||||
|
Loading…
Reference in New Issue
Block a user