Open
Bug 421165
Opened 16 years ago
Updated 2 years ago
Replace all users of NS_round with NS_floor(x+0.5)
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
NEW
People
(Reporter: alfredkayser, Unassigned)
References
Details
Spin off from bug 405308: Should we not at least create a bug to check all uses of NS_round and replace them with NS_floor(x+0.5) where possible? Any be add NS_roundup(x) { return floor(x + 0.5); } to nsMathUtils.h ? All current users seems to work with positive numbers, and NS_round is more expensive than NS_floor, but the same for positive numbers, and is 'wrong' for negative numbers...
It should definitely be its own function (not putting the +0.5 in at all the callsites), as roc points out in bug 405308 comment 21.
In bug 413787 I asked Michael Moy to add the appropriate function to nsMathUtils.h. Let's do that and then use this bug to convert various call sites to use the new function.
Depends on: 413787
Updated•16 years ago
|
Version: unspecified → Trunk
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•