From 9234349026ed33c9dec39d07df4330f0f71c908d Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Sat, 19 Apr 2014 00:09:52 +0800 Subject: [PATCH] Fix ConvertFlashRotation --- danmaku2ass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/danmaku2ass.py b/danmaku2ass.py index 372ea16..b672aee 100755 --- a/danmaku2ass.py +++ b/danmaku2ass.py @@ -519,7 +519,7 @@ def ConvertFlashRotation(rotY, rotZ, X, FOV=math.tan(2*math.pi/9.0)): logging.error('Clipped rotation angle: (rotY=%s, rotZ=%s, X=%s), it is a bug!' % (rotY, rotZ, X)) theta = math.acos(costheta)*180/math.pi else: - costheta = (FOV*math.cos(rotY*math.pi/180.0)+X*math.sin(rotY*math.pi/180.0))/(FOV-max(2, abs(X)+1)*math.sin(rotY*math.pi/180.0)) + costheta = (FOV*math.cos(rotY*math.pi/180.0)-X*math.sin(rotY*math.pi/180.0))/(FOV-max(2, abs(X)+1)*math.sin(rotY*math.pi/180.0)) try: if costheta > 1: costheta = 1