Avoid overflow in exponential var.

This commit is contained in:
Steven Robertson 2012-03-18 14:58:25 -07:00
parent 3ee4640001
commit ea43e312e4

View File

@ -172,9 +172,11 @@ var(17, 'popcorn', """
var(18, 'exponential', """ var(18, 'exponential', """
float dx = w * expf(tx - 1.0f); float dx = w * expf(tx - 1.0f);
float dy = M_PI * ty; if (isfinite(dx)) {
ox += dx * cosf(dy); float dy = M_PI * ty;
oy += dx * sinf(dy); ox += dx * cosf(dy);
oy += dx * sinf(dy);
}
""") """)
var(19, 'power', """ var(19, 'power', """