maxscript format (floats with that e&value) driving me nuts!
Greetings!
Is it possible to export a float value with the format funtion in maxscript in souch way that it does not nest those .e values in it? I mean a simple box contains vertices with something like [12.120010 0.1324e^12 5.000102]. What to do with those e?! I do not want to run some string parsing functions or whatsover. Is it possible to use somekind of round or something like that to get rid of that stoopid "e" ?
I don't think so. But whatever language you use to read the data, it should be able to parse that format for you.
In C/C++ you can call 'atof' or 'sscanf' to convert it back to a float.
In C/C++ you can call 'atof' or 'sscanf' to convert it back to a float.
I'm not sure what you're trying to do, or if you know what "that e thing" is. In case you don't know, floats output are written in a format much like scientific notation. For instance, instead of writing:
0.000000025
It will write
2.5e-8, which is the same things as
2.5 x 10^-8
I don't understand why you would want to get rid of "the e value". The only method I can think of would be to divide the value by 10^(e value). But then you get a small float that bares no resemblence to the original float.
If you just don't want it there for sanity's sake, then your going to have very big floats, like 132400000000, in your float boxes.
~David
0.000000025
It will write
2.5e-8, which is the same things as
2.5 x 10^-8
I don't understand why you would want to get rid of "the e value". The only method I can think of would be to divide the value by 10^(e value). But then you get a small float that bares no resemblence to the original float.
If you just don't want it there for sanity's sake, then your going to have very big floats, like 132400000000, in your float boxes.
~David
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement