commit | 098e4875c4e9fc19d47c1b6c25e8926370624e13 | [log] [tgz] |
---|---|---|
author | Austin Schuh <austin.linux@gmail.com> | Sun Mar 20 16:51:24 2016 -0700 |
committer | Austin Schuh <austin.linux@gmail.com> | Sun Mar 20 17:33:55 2016 -0700 |
tree | 238c594d9737fb454803b4c816d4c9792b032080 | |
parent | 214164ba7c481cf154b2b3646e4f9bcfef309052 [diff] [blame] |
Used ::std::hypot instead of re-writing it. Change-Id: Ib05bb5afdb1c4718d8f53b13a62aed806749e257
diff --git a/y2016/vision/target_receiver.cc b/y2016/vision/target_receiver.cc index 3f3c321..b861335 100644 --- a/y2016/vision/target_receiver.cc +++ b/y2016/vision/target_receiver.cc
@@ -26,7 +26,7 @@ double TargetWidth(double lx, double ly, double rx, double ry) { double dx = lx - rx; double dy = ly - ry; - return ::std::sqrt(dx * dx + dy * dy); + return ::std::hypot(dx, dy); } void SelectTargets(const VisionData &left_target,