c# - startlat = (double)((int)(SECornerLat * 100) / 100.0); // does not work for 33.73 but otherwise fine -
i want have double 2 digits after decimal point
startlat = (double)((int)(secornerlat * 100) / 100.0); if secornerlat equal 33.73 startlat 33.72.
i tried multiple other numbers works fine returns wrong number 33.73.
same thing in floor(33.73*100)/100.
this want:
double startlat = ((int) math.round((secornerlat * 100), 0) / 100.0);
Comments
Post a Comment