autopep8
This commit is contained in:
parent
73ce323271
commit
ac1b0cfd31
@ -708,6 +708,7 @@ def FilterBadChars(f):
|
||||
|
||||
|
||||
class safe_list(list):
|
||||
|
||||
def get(self, index, default=None):
|
||||
try:
|
||||
return self[index]
|
||||
|
@ -13,6 +13,7 @@ except (AttributeError, ImportError):
|
||||
|
||||
extcode = 0
|
||||
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
for Y in (120, 360):
|
||||
@ -23,6 +24,7 @@ def main():
|
||||
logging.info('(%3d, %3d), %4d, %4d => %4d, %4d, %4d, %4d%%' % (X, Y, rotY, rotZ, outX, outY, outZ, scaleX))
|
||||
CompareMatrix(rotY, rotZ, outX, outY, outZ)
|
||||
|
||||
|
||||
def CompareMatrix(rotY, rotZ, outX, outY, outZ):
|
||||
def ApproxEqual(a, b, e=0.015):
|
||||
assert e >= 0
|
||||
@ -31,13 +33,16 @@ def CompareMatrix(rotY, rotZ, outX, outY, outZ):
|
||||
return 0
|
||||
else:
|
||||
return a_b
|
||||
|
||||
def FormatError(i, j, l, r):
|
||||
global extcode
|
||||
if ApproxEqual(l, r) != 0:
|
||||
extcode = 1
|
||||
logging.error('l[%s][%s]=%9.6f r[%s][%s]=%9.6f' % (i, j, l, i, j, r))
|
||||
|
||||
def sind(x):
|
||||
return math.sin(x * math.pi / 180.0)
|
||||
|
||||
def cosd(x):
|
||||
return math.cos(x * math.pi / 180.0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user