su226 @ 2020-08-07 14:29:03
C++11 新增了个 hypot
函数,来自头文件 cmath
,作用是求两个点的距离,就像这样:
hypot(x1 - x2, y1 - y2)
返回的结果是
感兴趣的同学可以看看 hypot
函数的完整文档:https://zh.cppreference.com/w/cpp/numeric/math/hypot
by CSP_Sept @ 2020-08-07 14:30:19
哦
by cmll02 @ 2020-08-07 14:30:48
哦
stO @CSP_Sept Orz
by LucasXu80 @ 2020-08-07 14:34:35
哦
by 已注销ZdCpmQy3 @ 2020-08-07 14:35:23
%
by 血色黄昏 @ 2020-08-07 14:35:27
哦
by WanderingTrader @ 2020-08-07 14:36:48
哦
by Implicit @ 2020-08-07 14:48:39
哦
by Steven__Chen @ 2020-08-07 14:50:38
有必要吗
by Textbook_blasphemy @ 2020-08-07 14:50:48
哦
by Kevin_Wa @ 2020-08-07 14:57:33
知道了,下一位