GLBasic forum

Main forum => GLBasic - en => Topic started by: xteraco on 2010-Mar-01

Title: Need help finding Ceil
Post by: xteraco on 2010-Mar-01
In C if you want the top of a floating point number you just use the Ceil function. Here I notice there is no Ceil!!! Does GLBasic have a Ceil and Floor equivalent? If not perhaps someone has written a Ceil and Floor function?

I guess I could turn my float into a string, get rid of everything after the point, and turn it from a string to an int. It just seems a silly way to go about things.
Title: Re: Need help finding Ceil
Post by: Kitty Hello on 2010-Mar-01
Try that:
Code (glbasic) Select

IMPORT "C" double ceil(double)