I'd really like to see these functions in place or in addition to the round() function. Of course, if there is a way to simulate these with round() please feel free to correct me! :)

Of course, if there is a way to simulate these with round() please feel free to correct me! :)

Well right now round() does return the floor of a number despite what the reference says which has caused me problems on several occations :P.

The reference is quite clear, and it works exactly as the reference states. round(n) is the integer portion of the number (floor). round(n,1) rounds the number to the nearest whole number.

The reference is quite clear, and it works exactly as the reference states. round(n) is the integer portion of the number (floor).

The integer portion is not the floor. For instance round(-0.5) returns the floor which is -1 but the integer portion is 0. This is what has caused me problems when I really wanted the integer portion :).

The reference is quite clear, and it works exactly as the reference states. round(n) is the integer portion of the number (floor).

The integer portion is not the floor. For instance round(-0.5) returns the floor which is -1 but the integer portion is 0. This is what has caused me problems when I really wanted the integer portion :).

Ah, very good. I vaguely remember you talking about this before but in my simple tests this afternoon, negative numbers didn't come up. Now I remember that this was the issue.

The internal code for round() calls floor(), so it's definitely returning the floor of the number in that case. Since it's quite possible that people are relying on the current behavior, it's easier to change the reference to be more accurate. I presume you've written your own truncate() by now. :)

Well right now round() does return the floor of a number despite what the reference says which has caused me problems on several occations :P.