Commit fa972dcf authored by Clément Bœsch's avatar Clément Bœsch

avutil/display: use hypot().

parent 584327f2
......@@ -35,10 +35,8 @@ double av_display_rotation_get(const int32_t matrix[9])
{
double rotation, scale[2];
scale[0] = sqrt(CONV_FP(matrix[0]) * CONV_FP(matrix[0]) +
CONV_FP(matrix[3]) * CONV_FP(matrix[3]));
scale[1] = sqrt(CONV_FP(matrix[1]) * CONV_FP(matrix[1]) +
CONV_FP(matrix[4]) * CONV_FP(matrix[4]));
scale[0] = hypot(CONV_FP(matrix[0]), CONV_FP(matrix[3]));
scale[1] = hypot(CONV_FP(matrix[1]), CONV_FP(matrix[4]));
if (scale[0] == 0.0 || scale[1] == 0.0)
return NAN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment