snwagh / falcon-public

Implementation of protocols in Falcon
89 stars 45 forks source link

Fixing floatToMyType #35

Closed HuangPZ closed 2 years ago

HuangPZ commented 2 years ago

The previous implementation has the following bug: when the input is a float type and is negative, the output would be zero. E.g.,

floatToMyType(-2.2)

returns 0, which is not intended behavior.