]> git.sesse.net Git - stockfish/commitdiff
Simplify move_importance()
authorH. Felix Wittmann <hfwittmann@gmail.com>
Tue, 31 Dec 2013 11:24:57 +0000 (12:24 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 1 Jan 2014 11:58:10 +0000 (12:58 +0100)
Drop a useless parameter. This works because ratio1 and ratio2
are ratios of linear combinations of thisMoveImportance and
otherMovesImportance and so the yscale cancels out.

Therefore the values of ratio1 and ratio2 are independent
of yscale and yscale can be retired.

The same applies to yshift, but here we want to ensure
move_importance() > 0, so directly hard-code this safety
guard in function definition.

Actually there are some small differences due to rounding errors
and usually are at most few millisecond, that's means below 1% of
returned time, apart from very short intervals in which a difference
of just 1 msec can raise to 2-3% of total available time.

No functional change.


No differences found