Android Question Direct Casting

wonder

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

Is there a B4X direct equivalent to this?

Thanks in advance! :)
 

udg

Expert
Licensed User
Longtime User
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
Top