mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avutil/display: use hypot().
This commit is contained in:
parent
584327f22f
commit
fa972dcf1a
@ -35,10 +35,8 @@ double av_display_rotation_get(const int32_t matrix[9])
|
|||||||
{
|
{
|
||||||
double rotation, scale[2];
|
double rotation, scale[2];
|
||||||
|
|
||||||
scale[0] = sqrt(CONV_FP(matrix[0]) * CONV_FP(matrix[0]) +
|
scale[0] = hypot(CONV_FP(matrix[0]), CONV_FP(matrix[3]));
|
||||||
CONV_FP(matrix[3]) * CONV_FP(matrix[3]));
|
scale[1] = hypot(CONV_FP(matrix[1]), CONV_FP(matrix[4]));
|
||||||
scale[1] = sqrt(CONV_FP(matrix[1]) * CONV_FP(matrix[1]) +
|
|
||||||
CONV_FP(matrix[4]) * CONV_FP(matrix[4]));
|
|
||||||
|
|
||||||
if (scale[0] == 0.0 || scale[1] == 0.0)
|
if (scale[0] == 0.0 || scale[1] == 0.0)
|
||||||
return NAN;
|
return NAN;
|
||||||
|
Loading…
Reference in New Issue
Block a user