is nan - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: is nan (
/showthread.php?tid=633949)
is nan -
Bussyman - 10.05.2017
Hi,
HOw to check is number NaN ?
Re: is nan -
PaulDinam - 10.05.2017
Most scripts use sscanf, you can do something as simple as:
pawn Код:
isNumeric(const str[]) return !sscanf(str, "{d}");
Re: is nan -
Bussyman - 10.05.2017
But if float?
Re: is nan -
Toroi - 10.05.2017
How can float not be numeric?
What are you trying to do? you are not making sense at all
Re: is nan -
Bussyman - 10.05.2017
I do position calculations
X-X, Y-Y, Z-Z, i calculate position differences, and one time in printf i get nan ...
Re: is nan -
coool - 10.05.2017
X-X, Y-Y, Z-Z = 0 = NaN.
Re: is nan -
Nero_3D - 10.05.2017
Here it is
PHP код:
stock IsNaN(Float:number) {
return (number != number);
}