Inaccurate opacity floating point calculations
Bug #384420 reported by
Nadia Alramli
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Phatch |
Fix Released
|
Critical
|
Nadia Alramli |
Bug Description
when calculating the opacity, in the reflection and background actions (and possible others) we are using this method:
opacity = int(2.55 * opacity)
if opacity is 100 the result is:
int(2.55 * 100)= int(249.
Which is generating inaccurate results. The correct way of calculating is:
opacity = (255 * opacity) / 100
Changed in phatch: | |
assignee: | nobody → Nadia Alramli (nadiana) |
importance: | Undecided → Critical |
Changed in phatch: | |
milestone: | none → 0.2.1 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Only the reflection action needs to be fixed. I've looked for 2[.]55 with regexxer.