mirror of https://github.com/ARMmbed/mbed-os.git
Code style violation corrected
parent
b99584d16d
commit
43f0c14c9a
|
@ -287,8 +287,7 @@ static void mbed_minimal_formatted_string_double(char *buffer, size_t length, in
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
/* The part after the dot does not have a sign, so negate the value before rounding */
|
/* The part after the dot does not have a sign, so negate the value before rounding */
|
||||||
decimal = -decimal_double + 0.5;
|
decimal = -decimal_double + 0.5;
|
||||||
if (decimal >= precision)
|
if (decimal >= precision) {
|
||||||
{
|
|
||||||
/* Rounding carries over to value's integer part (e.g. -1.95 with dec_precision=1 -> -2.0) */
|
/* Rounding carries over to value's integer part (e.g. -1.95 with dec_precision=1 -> -2.0) */
|
||||||
integer--;
|
integer--;
|
||||||
decimal = 0;
|
decimal = 0;
|
||||||
|
@ -296,8 +295,7 @@ static void mbed_minimal_formatted_string_double(char *buffer, size_t length, in
|
||||||
} else {
|
} else {
|
||||||
/* Round the value */
|
/* Round the value */
|
||||||
decimal = decimal_double + 0.5;
|
decimal = decimal_double + 0.5;
|
||||||
if (decimal >= precision)
|
if (decimal >= precision) {
|
||||||
{
|
|
||||||
/* Rounding carries over to value's integer part (e.g. 1.95 with dec_precision=1 -> 2.0) */
|
/* Rounding carries over to value's integer part (e.g. 1.95 with dec_precision=1 -> 2.0) */
|
||||||
integer++;
|
integer++;
|
||||||
decimal = 0;
|
decimal = 0;
|
||||||
|
|
Loading…
Reference in New Issue