… | |
… | |
307 | } |
307 | } |
308 | /* we will also have an extra 0-5% variation between shops of the same type |
308 | /* we will also have an extra 0-5% variation between shops of the same type |
309 | * for valuable items (below a value of 50 this effect wouldn't be very |
309 | * for valuable items (below a value of 50 this effect wouldn't be very |
310 | * pointful, and could give fun with rounding. |
310 | * pointful, and could give fun with rounding. |
311 | */ |
311 | */ |
|
|
312 | //TODO: why use cosf at all, just % and scale linearly, gives more even distribution |
312 | if (val > 50) |
313 | if (val > 50) |
313 | val += float (val) * .05f * cosf ((tmp->uuid.seq & 0xffff) * float (M_PI * 2. / 0x10000)); |
314 | val += float (val) * .05f * cosf ((tmp->uuid.seq & 0xffff) * float (M_PI * 2. / 0x10000)); |
314 | } |
315 | } |
315 | |
316 | |
316 | return (sint64) val; |
317 | return (sint64) val; |