Getting the Nth Decimal of a Float

前端 未结 3 1681
长情又很酷
长情又很酷 2021-01-17 08:16

I was trying to compare between decimals in floats using if statements, but I don\'t know how to do it. I searched a lot but didn\'t get the answer.

For example:

3条回答
  •  孤城傲影
    2021-01-17 08:36

    Not sure if this is the best solution, but...

    Make a string of it; Loop through the string; Check what you wanna check.

提交回复
热议问题