windows程序设计中请问hypot函数的作用是什么
请问hypot函数的作用是什么
windows程序设计中说:每条线的长度为变量fradius,这是从中心到客户区的角落的距离:
fradius=hypot(xClient/2.0,yClient/2.0);
这里的xClient,yClient在前面都已经有复值。而且书中提到两次hypot.一次在函数前加了个_.一次没有。调用这个函数用不用加_呀
问题点数:20、回复次数:3Top
1 楼JennyVenus()回复于 2002-11-15 19:11:42 得分 8
计算三角形的斜边Top
2 楼cgsw12345(cgsw)回复于 2002-11-15 19:48:57 得分 4
可以去查幫助!MSDN應該有Top
3 楼zhf0021(屡战屡败,屡败屡战)回复于 2002-11-15 20:56:50 得分 8
FROM MSDN:
Calculates the hypotenuse.
Routine Required Header
_hypot <math.h>
double _hypot( double x, double y );
Parameters
x, y
Floating-point values
Libraries
All versions of the C run-time libraries.
Return Values
_hypot returns the length of the hypotenuse if successful or INF (infinity) on overflow.
Remarks
The _hypot function calculates the length of the hypotenuse of a right triangle, given the length of the two sides x and y. A call to _hypot is equivalent to the square root of x2 + y2.
Top




