is nan
#1

Hi,

HOw to check is number NaN ?
Reply
#2

Most scripts use sscanf, you can do something as simple as:
pawn Код:
isNumeric(const str[]) return !sscanf(str, "{d}");
Reply
#3

But if float?
Reply
#4

How can float not be numeric?

What are you trying to do? you are not making sense at all
Reply
#5

I do position calculations

X-X, Y-Y, Z-Z, i calculate position differences, and one time in printf i get nan ...
Reply
#6

X-X, Y-Y, Z-Z = 0 = NaN.
Reply
#7

Here it is
PHP код:
stock IsNaN(Float:number) {
    return (
number != number);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)