-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cast may be needed #411
Comments
I don't think this matters. Close? |
Sounds ok to me . I did though look into the code some and got a basic understanding. Referring to lines 130 – 138 and just focusing on the width calculation:
Assume: Canvas is 500x500 Then…… sizeX=500 // canvas then vx would be: vx = 1.9 // double precsion Assume: then width of new Rectangle would be: w = 380 // with double precision Is this difference between the 2 precisions ok?? |
Sorry, closed this by accident.... |
In file:
omero-insight/src/main/java/org/openmicroscopy/shoola/agents/imviewer/browser/BrowserUI.java
Line 134 in 40566b9
Regarding this code:
As is, the division is being done in integer precision.
If double precision is really wanted then sizeX and sizeY need to be cast to double:
Example snippet:
Output:
no cast, d is 2.0
with cast, d is 2.5
The text was updated successfully, but these errors were encountered: