Fix a TypeError generated by Math.asin(), which doesn't accept Decimal arguments.
This commit is contained in:
parent
ba3371e282
commit
9e49151ebf
1 changed files with 1 additions and 1 deletions
2
scour.py
2
scour.py
|
|
@ -2350,7 +2350,7 @@ def optimizeTransform(transform):
|
||||||
#
|
#
|
||||||
# http://en.wikipedia.org/wiki/File:Sine_cosine_plot.svg
|
# http://en.wikipedia.org/wiki/File:Sine_cosine_plot.svg
|
||||||
# shows asin has the correct angle the middle quadrants:
|
# 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 cos_A < 0: # otherwise needs adjusting from the edges
|
||||||
if sin_A < 0:
|
if sin_A < 0:
|
||||||
A = -180 - A
|
A = -180 - A
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue