POV-Ray : Newsgroups : povray.general : Round to nearest integer : Re: Round to nearest integer Server Time
19 Apr 2024 15:08:56 EDT (-0400)
  Re: Round to nearest integer  
From: Alain Martel
Date: 27 May 2021 14:50:23
Message: <60afe9ef$1@news.povray.org>
Le 2021-05-27 à 09:14, clipka a écrit :
> Am 27.05.2021 um 13:20 schrieb Mike Horvath:
>> Has someone written a macro that rounds a float to the nearest integer? 
> 
> `floor(FOO + 0.5)` should do the trick.

«ceil(FOO - 0.5)» should also work.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.