unity round float to nearest 100 code example
Example: unity round float to nearest 100
//int
int sayi;
int = ((int)(((int)(sayi/100))*100));
//float
float sayi;
sayi = ((float)(((int)(sayi/100))*100));
///////////////////////////////////////////////
//int
int yuvarlama;
int sayi;
int = ((int)(((int)(sayi/yuvarlama))*yuvarlama));
//float
float yuvarlama;
float sayi;
sayi = ((float)(((int)(sayi/yuvarlama))*yuvarlama));