nxp-mcuxpresso / mcux-sdk

MCUXpresso SDK
BSD 3-Clause "New" or "Revised" License
301 stars 136 forks source link

Float compare bugfix #61

Closed EmergReanimator closed 2 years ago

EmergReanimator commented 2 years ago

Prerequisites

Describe the pull request

Comparing a float number with == and != operators is not safe. See https://embeddeduse.com/2019/08/26/qt-compare-two-floats/ for more details. It is safer to cast the result to integer time to perform comparison.

Tests

EmergReanimator commented 2 years ago

Unwanted changes have been delivered.