ScriptSpot

Forum topic · General Scripting

check if element in multiarray is nan maxscript

By EliderDeli · 2018-05-29

Description

Hi again,
I wanted to know if theres a way to check for multi array elementns if they are nan ?

oV = SelectedVerticeID.pos
pairs = for o in refObj.selectedVerts where not o.pos ==" [-nan(ind),-nan(ind),-nan(ind)]" collect #(length(o.pos-oV), o.index ) --pairs distance and vertexpos
qsort pairs sortByDist --indexes and sorts
print pairs.count

That would be the rough Idear in pseudo Code.
Any help would be great
Greetings

Comments (4)

Swordslayer · 2018-05-29

Use bit.isNAN

EliderDeli · 2018-06-06

Thank you

.

jahman · 2018-05-29

maxscript working with values


isKindOf 0x4 Number -- true
isKindOf .5 Number -- true
isKindOf "1" Number -- false
isKindOf ("1" as integer) Number -- true

ps. seems like you ignore mxs reference

EliderDeli · 2018-05-29

Thanks for the Tipp but that doesnt seem to work. [-nan(ind),-nan(ind),-nan(ind)] Is till got values like that when i try to fill my array and check with isKindOf x Number
Greetings Eli