Page 1 of 1

Math function Floor()

Posted: Tue Feb 11, 2014 7:52 am
by trenatos
Is floor() available in LC?

I've tried to find out but haven't been able to find it, figured I should ask before giving up.

Re: Math function Floor()

Posted: Tue Feb 11, 2014 8:06 am
by Thierry
trenatos wrote:Is floor() available in LC?
what about trunc() ?

Thierry

Re: Math function Floor()

Posted: Tue Feb 11, 2014 8:13 am
by trenatos
Doesn't trunc always round towards 0 though?

Re: Math function Floor()

Posted: Tue Feb 11, 2014 8:22 am
by Thierry
trenatos wrote:Doesn't trunc always round towards 0 though?
Yes, you are right...
early morning, lack of coffee.. :?
I just test round() and seems to be what you like or do I miss something?

Regards,

Thierry

Re: Math function Floor()

Posted: Tue Feb 11, 2014 11:30 am
by trenatos
Round rounds to nearest whole number, floor() rounds to nearest *lower* whole number.

It's not that big of a deal, just strange to be missing, I'll just create the function for now and hope that RunRev builds floor() into future releases of LC.

Re: Math function Floor()

Posted: Tue Feb 11, 2014 2:03 pm
by Thierry
trenatos wrote:.... and hope that RunRev builds floor() into future releases of LC.
may be worth asking this in the "Feature requests" forum?

Thierry

Re: Math function Floor()

Posted: Tue Feb 11, 2014 4:06 pm
by FourthWorld
It's common enough in other languages that it may be ideal to just submit the request directly to the LCQCC so it can be tracked:
http://quality.runrev.com/

Please include ceiling with that as well, since the two are commonly found together. Thanks.

Re: Math function Floor()

Posted: Wed Feb 12, 2014 2:44 am
by trenatos
Are you suggesting I add it as a "bug"?

And, I'm not going anywhere near the "Feature request" forum anytime soon.

-edit-

Made an account and found that I could post an Enhancement suggestion.

Re: Math function Floor()

Posted: Wed Feb 12, 2014 3:14 am
by FourthWorld
trenatos wrote:Are you suggesting I add it as a "bug"?
The Quality Control Center form allows you to designate whether a report is a bug or a feature request.