Add an action probability to [0, 1] converter.
commit8039e3768e975596f1bfe44f6849e353e3d96a11
authorsveinung <sveinung@a0f10bec-cc02-0410-94fc-a9cfff90b4cd>
Thu, 3 Nov 2016 15:09:06 +0000 (3 15:09 +0000)
committersveinung <sveinung@a0f10bec-cc02-0410-94fc-a9cfff90b4cd>
Thu, 3 Nov 2016 15:09:06 +0000 (3 15:09 +0000)
tree69440f7d32ff474a434320c96f97b5a7e82430b1
parent05ee091671d889501e5d59c50a1564a30e8f0389
Add an action probability to [0, 1] converter.

Introduce action_prob_to_0_to_1_pessimist(). It converts an act_prob struct
to a double from 0 to 1. When an action probability represents a range it
will return the minimum probability.

See patch #7911

git-svn-id: svn://svn.gna.org/svn/freeciv/trunk@34357 a0f10bec-cc02-0410-94fc-a9cfff90b4cd
common/actions.c
common/actions.h