Copy link to clipboard
Copied
example:
var nmb:Number = 12.3;
// i wanna change from 12.3 to 12 instead
var nmb:Number = 12.3;
var str:String = nmb.toFixed(0);
trace( str ); // 12
Copy link to clipboard
Copied
do you want to round down?
Copy link to clipboard
Copied
No, I just wanna remove 12,3 to 12 instead of number
Copy link to clipboard
Copied
var nmb:Number = 12.3;
var str:String = nmb.toFixed(0);
trace( str ); // 12
Copy link to clipboard
Copied
THANK YOOOOOUUU!!!!! :--)
Copy link to clipboard
Copied
that's all rounding.
Copy link to clipboard
Copied
Hi.
If you want to keep it as a number:
var nmb:Number = 12.3;
nmb = int(nmb);
// or
// nmb = Math.floor(nmb);
Regards,
JC