X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc.h;h=dcef22a411c2c90276f8c993b13777f84f6f042c;hb=f3a2296e591d09dd50323fc3f96e800f5538d8bb;hp=b666b6be45be9c41a977af40d04c2e3493926a30;hpb=004ea2c25ebe2b900152d0d837089d03f20c8eca;p=stockfish diff --git a/src/misc.h b/src/misc.h index b666b6be..dcef22a4 100644 --- a/src/misc.h +++ b/src/misc.h @@ -152,7 +152,7 @@ private: /// - the slope can be adjusted using C > 0, smaller C giving a steeper sigmoid /// - the slope of the sigmoid when t = x0 is P/(Q*C) /// - sigmoid is increasing with t when P > 0 and Q > 0 -/// - to get a decreasing sigmoid, call with -t, or change sign of P +/// - to get a decreasing sigmoid, change sign of P /// - mean value of the sigmoid is y0 /// /// Use to draw the sigmoid @@ -163,7 +163,8 @@ inline int64_t sigmoid(int64_t t, int64_t x0, int64_t P, int64_t Q) { - assert(C > 0 && Q != 0); + assert(C > 0); + assert(Q != 0); return y0 + P * (t-x0) / (Q * (std::abs(t-x0) + C)) ; }