Mark Wedel wrote: > Well, at least having a #define at the top of shop.c isn't a bad idea > instead of it just being harcoded in the code itself. I did not like to introduce this #define PRICE_LIMIT because it would not work very well with the current function. Therefore I searched for an appropriate function to use and got: val = (PRICE_LIMIT-200)+20*isqrt(x-(PRICE_LIMIT-100)) (For values x>PRICE_LIMIT and "val = x" for x<PRICE_LIMIT.) This function gives (with PRICE_LIMIT=8700) nearly the same values as the current function (see attached image) but is differentiable and monotonic increasing. Additionally, modification of the parameter (PRICE_LIMIT) does not change the gradient very much. -------------- next part -------------- A non-text attachment was scrubbed... Name: plot.png Type: image/png Size: 4554 bytes Desc: not available Url : http://shadowknight.real-time.com/pipermail/crossfire/attachments/20040518/14512962/plot.png -------------- next part -------------- _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel