This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 99468 - Rounding errors in zoom %
Summary: Rounding errors in zoom %
Status: VERIFIED WORKSFORME
Alias: None
Product: uml
Classification: Unclassified
Component: General (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-29 23:24 UTC by _ tboudreau
Modified: 2008-06-23 23:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-03-29 23:24:11 UTC
Click the + button on a UML diagram repeatedly.  You get zoom increments 110%,
121%, 133.1%, 146.41%, 161.05%, 177.16%.  

My guess is this is supposed to be percentages, but it's not being done with
integer math (hint:  multiply the int percentage, do the math on the multiple,
then int-divide it back down).
Comment 1 Sergey Petrov 2007-03-30 17:22:29 UTC
why do you think it's error?
Comment 2 _ tboudreau 2007-04-02 19:10:40 UTC
Take Adobe Acrobat or any other application that has a zoom button.  They
typically zoom in increments of 10%.  Round numbers are easily understandable to
users, and the additional precision adds no useful information, just confusion
(i.e. nobody ever said "Man, I want to zoom this thing in to 161.05%!"

Furthermore, it's obvious that whoever wrote this code was *trying* for 10%
increments, they just didn't use integer math to compute them.
Comment 3 Sergey Petrov 2007-04-02 20:04:46 UTC
as I understand it's not "+10%", it's "*1.1" on each step, but yes it may have
sense to round "big" percents, but not small one
as for another tools, I tried acrobat reader and it goes through some unique
sequence of zoom levels, like 100,125,150,200,300,400... (seems to be
predefined, not calculated) and 75, 66.67,... to lower side
Comment 4 _ tboudreau 2007-04-03 04:18:25 UTC
Well, 66.67 is 2/3rds, people are familiar with that.  177.16% and 146.41% on
the other hand...

Comment 5 Peter Lam 2008-06-23 23:15:58 UTC
this is no longer reproducible in 6.5.
Comment 6 Peter Lam 2008-06-23 23:20:35 UTC
verified in 6.5 build 20080622.