Dropping the remainder of a number
#1

I'm new to PAWN, but have been scripting in various other languages for a while and have a simple question...

How do I drop the remainder of a number (turn a float into an integer)?

So..

10.5 = 10
9.2 = 9
29.9 = 29
Reply
#2

search "floatround" at the end here:
https://sampwiki.blast.hk/wiki/Scripting...s_Old#floatabs
Reply
#3

Or floatval(), a custom function. Search function will be useful.
Reply
#4

Quote:
Originally Posted by Mo3
Or floatval(), a custom function. Search function will be useful.
Can't seem to find it. Any chance of a link?
Reply
#5

Just use floatround, it's perfect for your needs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)