FLOOR()

Previous topic - Next topic

bigsofty

Undocumented? Seems to be present but not in the docs?

Handy to have all the same.  ;)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

erico

what does it do?

Kitty Hello

Cut post-decimal sign figures.
Floor(9.999) is 9.0

Kitty Hello

Ceil rounds to the next full integer. Ceil(1.01) is 2.0

erico

Nice...it does look like the things that could help me a lot on a couple fronts, thanks! :good:

spacefractal

FLOOR() is same as INTEGER()? Im have used INTEGER() various time.

This hence its been undocumented.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

bigsofty

Mathematicaly Floor() rounds down, INTEGER() truncates. This is especially evident when you use negative floating point numbers. Try -4.6 in both and you should get different results.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)