From 9e49151ebfb706caa57245343285b77819c66d00 Mon Sep 17 00:00:00 2001 From: Louis Simard Date: Sat, 12 Mar 2011 03:35:33 -0500 Subject: [PATCH] Fix a TypeError generated by Math.asin(), which doesn't accept Decimal arguments. --- scour.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scour.py b/scour.py index ca862a0..de5d04c 100755 --- a/scour.py +++ b/scour.py @@ -2350,7 +2350,7 @@ def optimizeTransform(transform): # # http://en.wikipedia.org/wiki/File:Sine_cosine_plot.svg # shows asin has the correct angle the middle quadrants: - A = Decimal(str(math.degrees(math.asin(sin_A)))) + A = Decimal(str(math.degrees(math.asin(float(sin_A))))) if cos_A < 0: # otherwise needs adjusting from the edges if sin_A < 0: A = -180 - A