James
Sorry, but the patch failed. It also needs the change suggested by Gijs, with
“double x,y;”
e.g.
static naRef f_round(naContext c, naRef me, int argc, naRef* args)
{
double x,y;
naRef a = naNumValue(argc > 0 ? args[0] : naNil());
naRef b = naNumValue(argc > 1 ? args[1] : naNil());
if(naIsNil(a))
naRuntimeError(c, "non numeric arguments to round()");
if (naIsNil(b))
b.num = 1.0;
#ifdef _MSC_VER // MSVC is not C99-compatible, no round() in math.
y = a.num / b.num;
x = floor(y + 0.5);
#else
x = round(a.num / b.num);
#endif
a.num = x * b.num;
return VALIDATE(a);
}
Alan
From: James Turner
Sent: Wednesday, October 09, 2013 10:51 AM
To: FlightGear developers discussions
Subject: Re: [Flightgear-devel] Simgear ,mathlib.c line 1 65
On 9 Oct 2013, at 10:23, Vivian Meazza <vivian.mea...@lineone.net> wrote:
It’s now getting on for a week since the build on Simgear was broken for Win
64/MSVC by this mistake. Any chance of a fix sometime soon?
Yes, was just about to push one - however you can always push such a fix
yourself!
Regards,
James
--------------------------------------------------------------------------------
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
--------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel