x


Int inspector field approximation...

Hi,

I need to input a int, 999999980 and the inspector actually approximate it... to 1000000000

Note, it does keep the true value in the script itself, don't know how this all work out..

How can I tell the inspector NOT to approximate the values I input during authoring?

Thanks,

Jean

more ▼

asked Feb 21 '11 at 06:34 AM

Jean Fabre gravatar image

Jean Fabre
3.1k 69 76 103

(comments are locked)
10|3000 characters needed characters left

1 answer: sort newest

In short, you cant. There is a limit to the number of possible values which can represented by a 32-bit floating point number.

http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

more ▼

answered Feb 21 '11 at 08:46 AM

_Petroz gravatar image

_Petroz
3.6k 27 35 57

uhm ,I am talking about int here, not floating point values, but maybe this applies as well somehow.

Feb 21 '11 at 12:18 PM Jean Fabre

no ints should be fine up to 2147483647. Unless it is internally getting converted to a float which may introduce accuracy issues. I ran a test and I cannot work out anyway to get this value of 999999980.

Feb 22 '11 at 01:05 AM _Petroz

I find hard to believe that they can't show the proper value in the inspector especially since this is just strings representations of the value itself. I guess it's just an optimization of some sort that wasn't verified fully and left as is.

Feb 22 '11 at 08:33 AM Jean Fabre
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x482
x117
x39

asked: Feb 21 '11 at 06:34 AM

Seen: 958 times

Last Updated: Feb 21 '11 at 06:34 AM