[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/libpaper texcoords.py
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gfx/libpaper texcoords.py |
Date: |
Tue, 03 Sep 2002 09:18:09 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/03 09:18:08
Modified files:
gfx/libpaper : texcoords.py
Log message:
No tail recursion :(
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/texcoords.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: gzz/gfx/libpaper/texcoords.py
diff -c gzz/gfx/libpaper/texcoords.py:1.8 gzz/gfx/libpaper/texcoords.py:1.9
*** gzz/gfx/libpaper/texcoords.py:1.8 Tue Sep 3 09:06:00 2002
--- gzz/gfx/libpaper/texcoords.py Tue Sep 3 09:18:08 2002
***************
*** 144,152 ****
"""
def chooseInts(rnd):
! a,b,c,d = [int(0.5*rnd.nextGaussian()) for i in range(0,4)]
! det = a*d-b*c
! if det == 0: return chooseInts(rnd)
return (a,b,c,d)
a,b,c,d = chooseInts(rnd)
# 1 / determinant
--- 144,152 ----
"""
def chooseInts(rnd):
! a,b,c,d = 0,0,0,0
! while a*d-b*c == 0:
! a,b,c,d = [int(0.5*rnd.nextGaussian()) for i in range(0,4)]
return (a,b,c,d)
a,b,c,d = chooseInts(rnd)
# 1 / determinant