c 中整数后面的点 (.) 是什么意思? [英] What is the meaning of a dot (.) after an integer in c?
本文介绍了c 中整数后面的点 (.) 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有人知道 .在 C 中的整数表示之后.
I would like to know if anybody knew what a . after an integer in C means.
我有一段我想转换的代码,这是我唯一不确定它做什么的.
i have this piece of code i want to convert and that is the only thing i am not sure of what it does.
如果(y>=0.)有什么用.在这儿吗?
if (y>=0.) what does the . here do?
完整代码:
double angleOf(double x, double y) {
double dist=sqrt(x*x+y*y) ;
if (y>=0.) return acos( x/dist);
else return acos(-x/dist)+.5*CIRCLE_RADIANS; }
推荐答案
和 0.0
一样,它会把它当作 double 而不是整数,所以你不需要转换它.
It's same as 0.0
, it will treat it as double instead of an integer, so you don't need to cast it.
这篇关于c 中整数后面的点 (.) 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文