Freeciv-3.3
Loading...
Searching...
No Matches
advtools.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__ADVTOOLS_H
14#define FC__ADVTOOLS_H
15
16/* common */
17#include "fc_types.h"
18
19#define MORT 24
20
21/* relative comparison for equality of floats */
22#define FC_EPSILON (0.001)
23#define ADV_WANTS_EQ(_w1, _w2) (fabs((_w1) - (_w2)) < FC_EPSILON * (fabs((float) (_w1)) + fabs((float) (_w2))))
24
26
27/*
28 * To prevent integer overflows the product "power * hp * firepower"
29 * is divided by POWER_DIVIDER.
30 *
31 */
32#define POWER_DIVIDER (POWER_FACTOR * 3)
33
34#endif /* FC__ADVTOOLS_H */
adv_want amortize(adv_want benefit, int delay)
Definition advtools.c:29
char * incite_cost
Definition comments.c:76
float adv_want
Definition fc_types.h:1063