Replace comparison check for infinity with isNaN function call

This makes the code more readable

Test: cts-tradefed  run singleCommand cts-dev --module CtsUtilTestCases --test android.util.cts.HalfTest

Change-Id: I6096a538eaaca7204a7e1498a232faa9b1db1938
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
1 file changed