Decimal places as needed

I read a vertex normal of a face in maxscript and it returns an array of 3 arrays like this:

#([0,-1,0], [0,-1,0], [0,-1,0])

this is ok but when I extract single numbers from each array and send it to output (just like below, example for one number only):

for i = 1 to theMesh.numfaces do ( vertexNormal = meshop.getfaceRnormals theMesh i format "%,%,%,%,%,%,%,%,%," vertexNormal[1].x vertexNormal[1].y vertexNormal[1].z vertexNormal[2].x vertexNormal[2].y vertexNormal[2].z vertexNormal[3].x vertexNormal[3].y vertexNormal[3].z to:outFile

I am getting the right numbers but all of them have decimal places like for example “0” is “0.0” and I want to shrink the file size as much as possible so where not needed I want maxscript not to put this unnecessary data:

0.0,-1.0,0.0,<br>0.0,-1.0,0.0,<br>0.0,-1.0,0.0

How do I do it?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

solved

see my reply in your thread at Area forum

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.