Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
> Who coded that formula without checking it's output boundaries?
If nobody thought it would ever exceed them... I'm more surprised that the failure of rendering a wallpaper crashes the whole system. -
@sbiewald the formula itself "mathematically" never exceeds 255, because it's coefficients are normalized to 1. So if input is 3 value in range(0-255), output will be too.
But they compute each value by itself, then round it, then sum them. So output can get as high as 258. There is a basic math principle that should be tought as one of the first concept in a programming course (as it is in any physics or math course): never round any non-final value if it's not necessary.
Related Rants
Have you heard about the background bug on Android 10? I'm talking about this...
https://xda-developers.com/wallpape...
How the hell does something like that happen?? Who coded that formula without checking it's output boundaries?
rant
bug
android
bootloop
wallpaper