mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Performance fixes relating to floating point constants
This replaces unnecessary double-precision soft-float operations with single-precision floating-point operations, mainly by casting. In a couple places I also replace a function call with a constant.
This commit is contained in:
@@ -69,8 +69,8 @@ void FunctionGraphView::reloadBetweenBounds(float start, float end) {
|
||||
if (start == end) {
|
||||
return;
|
||||
}
|
||||
float pixelLowerBound = floatToPixel(Axis::Horizontal, start)-2.0;
|
||||
float pixelUpperBound = floatToPixel(Axis::Horizontal, end)+4.0;
|
||||
float pixelLowerBound = floatToPixel(Axis::Horizontal, start) - 2.0f;
|
||||
float pixelUpperBound = floatToPixel(Axis::Horizontal, end) + 4.0f;
|
||||
/* We exclude the banner frame from the dirty zone to avoid unnecessary
|
||||
* redrawing */
|
||||
KDRect dirtyZone(KDRect(pixelLowerBound, 0, pixelUpperBound-pixelLowerBound,
|
||||
|
||||
Reference in New Issue
Block a user