Search Unity

-3.3438327-06 weird value

Discussion in 'Scripting' started by verbatimline, Apr 7, 2009.

  1. verbatimline

    verbatimline

    Joined:
    Mar 24, 2009
    Posts:
    88
    Hi,
    I'm debugging my code line by line and I see values like these in the inspector. What do they mean? And are they essentially zero?
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    What you're seeing is called the scientific notation.

    -3.3438327e-06

    equals

    -3.3438327 x 10^-6,

    which is

    -0.0000033438327

    which is very close to zero.

    You usually end up with values like this, because of the limited precision of floating point values represented in a computer, so after doing some math, results often end up being slightly off.
     
  3. verbatimline

    verbatimline

    Joined:
    Mar 24, 2009
    Posts:
    88
    i c. cool thanks.

    BTW, I heard of matrix creep before, could this throw things off during prolonged game play?