Jump to content
  • Advertisement
Sign in to follow this  
Samurai Jack

maxscript format (floats with that e&value) driving me nuts!

This topic is 4673 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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" ?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Thank you very much for the explanation!
The only thing to check is now is whenever gmax is able to reed the saved values back. I'll check that back at the office.

Thank you very much!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!