What is the meaning of a dot (.) After an integer in c?

I would like to know if anyone knew. after an integer in C means.

I have this piece of code that I want to convert, and this is the only thing I am not sure about what it does.

if (y> = 0.) what is it. to do here?

full code:

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; }

      

+3


source to share


2 answers


Same as, 0.0

it will treat it as a double instead of an integer, so you don't need to cast it.



+6


source


The endpoint makes the literal a float (double) literal instead of an integer one.



+2


source







All Articles