-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjustments according to review comments;
- Loading branch information
1 parent
cac4cdf
commit 1c5b656
Showing
2 changed files
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1126,11 +1126,11 @@ private Double[] calculateBarSpacing(int aNumberOfDisplayedFragments, BarWidthOp | |
double tmpGapDeviation; | ||
double tmpGapSpacing; | ||
double tmpCategoryGap; | ||
double tmpFinalHistogramHeight = 0; | ||
double tmpFinalHistogramHeight = 0.0; //return value is initialised here with a default value | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
JonasSchaub
Author
Collaborator
|
||
double tmpFinalGapSpacing; | ||
switch (aBarWidthOptionConstant) { | ||
case SMALL: | ||
if (aNumberOfDisplayedFragments <= 24) { | ||
if (aNumberOfDisplayedFragments <= 24) { //magic number | ||
tmpCurrentHistogramHeight = GuiDefinitions.GUI_NOT_SCROLLABLE_HEIGHT / aNumberOfDisplayedFragments; | ||
tmpGapDeviation = tmpCurrentHistogramHeight / (GuiDefinitions.GUI_NOT_SCROLLABLE_HEIGHT / 24); | ||
tmpGapSpacing = HistogramViewController.GUI_HISTOGRAM_SMALL_BAR_GAP_CONST * tmpGapDeviation; | ||
|
@@ -1144,7 +1144,7 @@ private Double[] calculateBarSpacing(int aNumberOfDisplayedFragments, BarWidthOp | |
} | ||
break; | ||
case MEDIUM: | ||
if (aNumberOfDisplayedFragments <= 17) { | ||
if (aNumberOfDisplayedFragments <= 17) { //magic number | ||
tmpCurrentHistogramHeight = GuiDefinitions.GUI_NOT_SCROLLABLE_HEIGHT / aNumberOfDisplayedFragments; | ||
tmpGapDeviation = tmpCurrentHistogramHeight / (GuiDefinitions.GUI_NOT_SCROLLABLE_HEIGHT / 17); | ||
tmpGapSpacing = HistogramViewController.GUI_HISTOGRAM_MEDIUM_BAR_GAP_CONST * tmpGapDeviation; | ||
|
@@ -1159,7 +1159,7 @@ private Double[] calculateBarSpacing(int aNumberOfDisplayedFragments, BarWidthOp | |
break; | ||
case LARGE: | ||
default: | ||
if (aNumberOfDisplayedFragments <= 13) { | ||
if (aNumberOfDisplayedFragments <= 13) { //magic number | ||
tmpCurrentHistogramHeight = GuiDefinitions.GUI_NOT_SCROLLABLE_HEIGHT / aNumberOfDisplayedFragments; | ||
tmpGapDeviation = tmpCurrentHistogramHeight / (GuiDefinitions.GUI_NOT_SCROLLABLE_HEIGHT / 13); | ||
tmpGapSpacing = HistogramViewController.GUI_HISTOGRAM_LARGE_BAR_GAP_CONST * tmpGapDeviation; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Okay, that is fine for me.
But one could argue that the 0.0 is by default the default value, and you don't have to initialize it explicitly.