Quote:
Originally Posted by Ze Emulatron
From Blitz Basic 2 - Reference Guide-ENG.pdf available on http://amiga-manuals.xiik.net/amiga.php in eBooks category Blitz_Basic_2___ebook_ENG.rar -> 37328 KB
For floor
Function: Int
Syntax: Int (Expression)
Modes: Amiga/Blitz
Description:
This returns the Integer part (before the decimal point) of Expression.
Example:
Code:
Print Int(23.456) ; Will simply print 23
Mod
Code:
Print 10 MOD 3 ; Will print 1
For Ceiling you could do
Code:
PRINT (INT(23.456))+1
If you really want to use ceiling and floor you could do
Code:
function ceiling{n}
function return (INT(n))+1
end function
Code:
function floor{n}
function return INT(n)
end function
|
thanks a lot, Ze Emulatron i have skipped the INT and MOD commands
(and thanks leathered for the sprite trick in the other thread
)