Does anybody have a simple way of getting these small numbers back to the way they're written normally. Sorry, I can't remember the maths term for this (is it exponent?).
For example
x#=0.0001
print x
will yield a result of 1.e-004
"So what's your problem with that", you might say.
Well, I'm dealing with a .x file exporter that doesn't like numbers unless they're expressed as x.xxxxxxx. It doesn't like all this 'e-' stuff.
So if I do
VerySmallNumber#=0.00001
Writeline(file,VerySmallNumber#)
everything gets messed up.
I'm sure there must be a simple way - I'm just not seeing it. Any suggestions?
ATM, I'm thinking about multiplying by 1000, converting to a string, then hacking the decimal point back into the right position, but that seems like a VERY ugly workaround.
And don't say
If x<0.001 then x=0.001
I'm talking about lightmap UVs here which have to be between 0 and 1, so I can't afford to lose any precision.
For example
x#=0.0001
print x
will yield a result of 1.e-004
"So what's your problem with that", you might say.
Well, I'm dealing with a .x file exporter that doesn't like numbers unless they're expressed as x.xxxxxxx. It doesn't like all this 'e-' stuff.
So if I do
VerySmallNumber#=0.00001
Writeline(file,VerySmallNumber#)
everything gets messed up.
I'm sure there must be a simple way - I'm just not seeing it. Any suggestions?
ATM, I'm thinking about multiplying by 1000, converting to a string, then hacking the decimal point back into the right position, but that seems like a VERY ugly workaround.
And don't say
If x<0.001 then x=0.001
I'm talking about lightmap UVs here which have to be between 0 and 1, so I can't afford to lose any precision.