Converting floats to ints
in
Programming Questions
•
1 year ago
I've seen a few ways to write converting a float to an int. The way I normally do it is:
- float something = 1.2345
- int newSomething = int(something);
- int newSomething = (int)something;
1