mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/driver_hih6130: fix 'absolute-value' error
This commit is contained in:
parent
5fba2c8387
commit
2e3488154c
@ -65,10 +65,10 @@ int main(void)
|
||||
/* Split value into two integer parts for printing. */
|
||||
fractional = modff(hum, &integral);
|
||||
printf("humidity: %4d.%04u %%",
|
||||
(int)integral, (unsigned int)abs(fractional * 10000.f));
|
||||
(int)integral, (unsigned int)abs((int)(fractional * 10000.f)));
|
||||
fractional = modff(temp, &integral);
|
||||
printf(" temperature: %4d.%04u C\n",
|
||||
(int)integral, (unsigned int)abs(fractional * 10000.f));
|
||||
(int)integral, (unsigned int)abs((int)(fractional * 10000.f)));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user