Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

round float c#

float number = 1.3333333f;
int decimalPlaces = 2;
float roundedNumber = (float) Math.Round(number, decimalPlaces);
//output 1.33
 
PREVIOUS NEXT
Tagged: #float
ADD COMMENT
Topic
Name
8+6 =