Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [PATCH] [aiunit.c-1.40] ai_military_findvictim() clean
Home

[Freeciv-Dev] Re: [PATCH] [aiunit.c-1.40] ai_military_findvictim() clean

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: Raahul Kumar <raahul_da_man@xxxxxxxxx>, Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] [aiunit.c-1.40] ai_military_findvictim() cleanup (PR#1264)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Feb 2002 20:00:31 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Feb 22, 2002 at 07:20:43PM +0100, Petr Baudis wrote:
> > Could be replaced by
> > > +          benefit = (benefig * punit->hp) / unit_type(punit)->hp;

> +          benefit *= punit->hp / unit_type(punit)->hp;

Wrong. It will first do the division (as integer) and than the
multiplication.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "SIGDANGER - The System is likely to crash soon"


[Prev in Thread] Current Thread [Next in Thread]