From fa972dcf1a36805de4aaa031331061a0a334996d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Tue, 20 May 2014 19:51:03 +0200 Subject: [PATCH] avutil/display: use hypot(). --- libavutil/display.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavutil/display.c b/libavutil/display.c index cc11536d36..da47cee66b 100644 --- a/libavutil/display.c +++ b/libavutil/display.c @@ -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;