We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8430a31 commit bd41996Copy full SHA for bd41996
MetadataExtractor/Formats/QuickTime/QuickTimeMetadataReader.cs
@@ -89,11 +89,11 @@ static void SetRotation(QuickTimeTrackHeaderDirectory directory)
89
var x = matrix[1] + matrix[4];
90
var y = matrix[0] + matrix[3];
91
var theta = Math.Atan2(x, y);
92
- var degree = ((180 / Math.PI) * theta) - 45;
93
- if (degree < 0)
94
- degree += 360;
+ var degree = RadiansToDegrees(theta) - 45;
95
96
directory.Set(QuickTimeTrackHeaderDirectory.TagRotation, degree);
+
+ static double RadiansToDegrees(double radians) => (180 / Math.PI) * radians;
97
}
98
99
0 commit comments