
Discontinuous Scaling Function
Qendolin opened this issue ยท 2 comments
I was wondering how you arrived at the scale adjustment function in setScaleFactor
.
if(scaleFactor > 2) scaleFactor = 1.5 * (0.3 + Math.log10(scaleFactor));
else scaleFactor = 1 + (scaleFactor * 0.075);
Graphing this function shows that it is discontinuous: https://www.desmos.com/calculator/ijqfeoamcg
I'ld assume that's not intentional.
For my fork I've changed it back to a linear scale function. I'm not sure what the reason for a log function would be.
The discontinuity shown in your graph does not exist in a practical sense. The value of scaleFactor is only ever (without changing more of the base code) an integer value, and the function itself handles the values as expected. The reason I used a log function was because I originally only had a 1080p monitor to test with and wanted an easy way to allow more fine tuning of the size compared to a linear function. I've already re-written this code locally and I prefer the new scaling I've done anyway.