Android Question Direct Casting

wonder

Expert
Licensed User
Longtime User
Hi!
Code:
//C code
double abc = 1.0001;
printf("%d", (int)abc); //output: 1

Is there a B4X direct equivalent to this?

Thanks in advance! :)
 
Hi,

using NumberFormat (or NumberFormat2) you can set how many decimal places to show, if any.
Edit: and don't forget the Floor function..
 
Upvote 0
Back
Top