Posted By: DLively
no decimal places - 04/30/14 04:01
Hello
I would like to know how to tell the engine, that if a variable has a deciamal place to round to the lowest number?
is there a simple code to do this? :?
Im not sure about A8's implementation of lite c, but c++ has instructions for rounding numbers named round, floor, ceil, and trunc.
im unsure what round and trunc does, but floor always round down while ceil always round up.
Posted By: DLively
Re: no decimal places - 04/30/14 06:27
Thanks Amanda, Ill look into the manual with that new information
Posted By: DLively
Re: no decimal places - 04/30/14 06:31
okay, so I already knew this one
floor()
Posted By: WretchedSid
Re: no decimal places - 04/30/14 17:53
im unsure what round and trunc does
round() rounds to the nearest integer in halfway cases.
trunc() rounds to the nearest integer that is not greater in magnitude than the input.