Jump to content
Sign in to follow this  
micovery

1.#QNAN for player coordinates

Recommended Posts

I've been noticing that sometimes getPosATL gives me 1.#QNAN for the X, and Y coordinates.

 [1.#QNAN, 1.#QNAN, 0]

I have not narrowed it down to know exactly when it happens. My first question here is:

:icon_question: Is there any Arma 3 command I could use to reliably use to determine if a variable which is supposed to be a finite SCALAR is instead 1.#QNAN ?

I am aware of this command: https://community.bistudio.com/wiki/finite

But I have no way to test it, since I do not know how to artificially create a variable that has 1.QNAN value.

I know that "NaN" stands for Not-A-Number ... so my second question is:

:icon_question: What conditions are needed for a variable in SQF to end up being "1.QNAN" ?

In other languages like JavaScript you can end up with "NaN" when doing arithmetic on values that are not numbers.

Edited by micovery

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×