View Single Post
Old 08 June 2014, 10:30   #4
Raislin77it
Zone Friend
 
Raislin77it's Avatar
 
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
Quote:
Originally Posted by Ze Emulatron View Post
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 )
Raislin77it is offline  
 
Page generated in 0.04377 seconds with 11 queries