Commits

Anonymous committed 037c3c1

rearrange functions

Comments (0)

Files changed (1)

 from math import *
 from pprint import pprint, pformat
 
+def is_zero(flt):
+        # a large epsilon is possible, because we're dealing with images
+        return (abs(flt) < .001)
+
 def transform(item, matrix):
         pdb.gimp_message([coeff for row in matrix for coeff in row])
         return pdb.gimp_item_transform_matrix(item, *[coeff for row in matrix for coeff in row])
 
-def is_zero(flt):
-        # a large epsilon is possible, because we're dealing with images
-        return (abs(flt) < .001)
-
 def orthogonal_projection(img, drawable, a, b, c):
         m = [[1,0,0], [0,1,0], [0,0,1]]
 
                         k = 1.0 / ((a ** 2) + (c ** 2))
 
                         m = [[k*(c**2),0, 0],[0,k*(a**2 + c**2),0],[0, 0, 1]]
-
-
                 else:
                         # b,c = 0
                         m = [[0,0,0],[0,1,0],[0,0,1]]