adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] New physics engine for 0.4, test 2


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] New physics engine for 0.4, test 2
Date: Sun, 29 Sep 2002 21:15:03 +0200

> Here's another one:
> 
> Traceback (most recent call last):
>   File "test_intersec2.py", line 467, in ?
>     realv = obj1.intersect(obj2, v)
>   File "test_intersec2.py", line 336, in intersect
>     r = l1.segments_intersect(l2)
>   File "test_intersec2.py", line 176, in segments_intersect
>     r = (Ty * (D.x - C.x) - Tx * (D.y - C.y)) * denom
> OverflowError: integer multiplication

Doh! This is bad. I'm using large shifts to gain precision during the
line intersection algorithm, but it look like I'm shifting too much and
it sometimes overflow. Well, I'll reduce the shift and hope the
precision will still be good. Floats have this advantage that precision
is always very good, but I'd like to avoid using them as much as
possible.

Anyway, this is nothing more than a pre-version! ^_^'

Alex.
-- 
http://www.gnurou.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]