show 2 decimals of float
// You can use .ToString("f2") to show 2 decimals of "f3" to show 3, etc.
float num = 123.24523;
Debug.Log(num.ToString("f2")); // Output: 123.24
show 2 decimals of float
// You can use .ToString("f2") to show 2 decimals of "f3" to show 3, etc.
float num = 123.24523;
Debug.Log(num.ToString("f2")); // Output: 123.24
int to float c
float percentage;
percentage = (float)number/total * 100;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us