Hi,
I have a strange thing on Vista 64. When I start python and do a calculation, the result is slightly different before and after starting panda.
On a simple calcul, like this one :
a = 0.1
for i in range(10) :
print a
a += 0.1
import direct.directbase.DirectStart
b = 0.1
for i in range(10) :
print b
b += 0.1
I have the result
Like you see, the result is slightly different.
On a simple calculation like this, it doesn’t matter. But the problem is bigger for bigger calculation like this one (it’s using Polygon library) :
from Polygon import Polygon as Pol
p1 = Pol([(468.53778076171875, 492.2611083984375), (510.03778076171875, 492.2611083984375), (510.03778076171875, 536.7611083984375), (468.53778076171875, 536.7611083984375)])
print p1.center()
import direct.directbase.DirectStart
print p1.center()
the error can’t be ignore cause the result is :
The center’s position is wrong 3 digits after the comma and with a big difference !!!
By digging a little, I found the calculation mistake occurs right after the line
self.pipe = selection.makeDefaultPipe()
in direct.showbase.Showbase, in makeDefaultPipe on line 461.
Right before the makeDefaultPipe call, the calculation is correct, but after, the calculation is wrong.
So I’d like to know if this behavior is expected on a 64 bit system, or is it a bug ?
Cause all works really well on a 32 bits system (tested on linux, XP or Vista).
If anybody has a clue on how to solve this, I would be very grateful.