A awama Active Member Licensed User Longtime User Sep 28, 2013 #1 Sometimes has a variable V1 a value NaN, which no longer goes away, although other variables V2 + V3 have the correct values for the calculation of V1. The values of V2 + V3 every second change. How can I check if a variable has a value of NaN?
Sometimes has a variable V1 a value NaN, which no longer goes away, although other variables V2 + V3 have the correct values for the calculation of V1. The values of V2 + V3 every second change. How can I check if a variable has a value of NaN?
Erel B4X founder Staff member Licensed User Longtime User Sep 28, 2013 #2 This means that you did an "illegal" math calculation (like square root of a negative number). You can use this code: B4X: Sub IsNan(d As Double) As Boolean Return d <> d End Sub Upvote 0
This means that you did an "illegal" math calculation (like square root of a negative number). You can use this code: B4X: Sub IsNan(d As Double) As Boolean Return d <> d End Sub
A awama Active Member Licensed User Longtime User Sep 28, 2013 #3 Thanks Erel, I will check it and try it. Upvote 0