Reputation: 1
Usually, I would use toFixed to get less decimals, but this time I need the number to not be rounded. Example: 3.99 -> 3 How can I do this?
Upvotes: 0
Views: 886
Reputation: 9839
You can use int
:
trace(int(3.99)) // gives : 3
Or Math.floor
:
trace(Math.floor(3.99)) // gives : 3
Upvotes: 3