[Scummvm-devel] round(float) in riven_external.cpp

Fiodar Strizhniou fedor_qd at mail.ru
Wed Aug 19 06:26:18 CEST 2015


Ok. It can be easy implemented:
inline float round(float val){
return floor(val + 0.5)
}
Always yours, Strizhniou Fedor.
С уважением, Стрижнёв Фёдор.

исходное сбщ
Тема: Re: [Scummvm-devel] round(float) in riven_external.cpp
От: Matthew Hoops <clone2727 at gmail.com>
Дата: 18.08.2015 22.36

It's C99, which I had forgotten. I assume your libc is from the stone age.

It can just be replaced by floor(x + 0.5) in this case.

Matt
On Aug 18, 2015 2:31 PM, "Федор" <fedor_qd at mail.ru> wrote:

> This function called from libc? I ask this because Symbian libc hasn't
> that function.
> I search code and found in math_util.cpp in wintermute engine this
> function float MathUtil::round(float val). They have same behaviour?
>
>
> Fedor Strizhnev
> Федор Стрижнёв.
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>
>






More information about the Scummvm-devel mailing list