diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-09-02 22:32:44 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-09-04 09:48:53 +0200 |
commit | 11b65a28613a8d2e171d3b728438164780cda490 (patch) | |
tree | 54c1d866c4632a825576cf60b1ebf732e374ed89 | |
parent | b85b718e69b03089fec5f7b13917e1f94fe1937b (diff) |
Header: use upper case floating point suffix
-rw-r--r-- | Header.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -196,16 +196,16 @@ void Header_draw(const Header* this) { } const int width = COLS - pad; int x = pad; - float roundingLoss = 0.0f; + float roundingLoss = 0.0F; Header_forEachColumn(this, col) { Vector* meters = this->columns[col]; - float colWidth = (float)width * HeaderLayout_layouts[this->headerLayout].widths[col] / 100.0f; + float colWidth = (float)width * HeaderLayout_layouts[this->headerLayout].widths[col] / 100.0F; roundingLoss += colWidth - floorf(colWidth); - if (roundingLoss >= 1.0f) { - colWidth += 1.0f; - roundingLoss -= 1.0f; + if (roundingLoss >= 1.0F) { + colWidth += 1.0F; + roundingLoss -= 1.0F; } for (int y = (pad / 2), i = 0; i < Vector_size(meters); i++) { @@ -214,7 +214,7 @@ void Header_draw(const Header* this) { float actualWidth = colWidth; if (meter->mode == TEXT_METERMODE) { for (int j = 1; j < meter->columnWidthCount; j++) { - actualWidth += (float)width * HeaderLayout_layouts[this->headerLayout].widths[col + j] / 100.0f; + actualWidth += (float)width * HeaderLayout_layouts[this->headerLayout].widths[col + j] / 100.0F; } } |