summaryrefslogtreecommitdiff
path: root/libavutil/display.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2014-05-20 19:51:03 +0200
committerClément Bœsch <u@pkh.me>2014-05-23 23:30:21 +0200
commitfa972dcf1a36805de4aaa031331061a0a334996d (patch)
tree9b46f644b8f5867e260d171e420d16eff950c168 /libavutil/display.c
parent584327f22fbf964fa63aa5cf5893873962af5245 (diff)
downloadffmpeg-fa972dcf1a36805de4aaa031331061a0a334996d.tar.gz
avutil/display: use hypot().
Diffstat (limited to 'libavutil/display.c')
-rw-r--r--libavutil/display.c6
1 files 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;