playMaker

Author Topic: mathmatics  (Read 1350 times)

Sjones

  • Full Member
  • ***
  • Posts: 201
    • View Profile
mathmatics
« on: March 23, 2013, 06:50:34 PM »
So this is more likely a bug with unity, but wtf...

using a float multiply I multiplied 700 by 1.2, I get the result 840.0001, where how and why has it got 0.0001 added to the end?

same if 700 x 1.19

and 700 x 1.18 gives a 0.99999 value

another one I found too was 70 x 1.17

So with a fix unlikely (as its unity not PM) anyone got any idea how to work around this?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15212
  • Official Playmaker Support
    • View Profile
Re: mathmatics
« Reply #1 on: March 24, 2013, 03:11:46 AM »
Hi Scott,

 This is "perfectly" normal... in a weird way:

http://answers.unity3d.com/questions/50187/floating-point-accuracy-weirdness.html

bye,

 Jean