mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Avoid overflow in exponential var.
This commit is contained in:
parent
3ee4640001
commit
ea43e312e4
@ -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);
|
||||||
|
if (isfinite(dx)) {
|
||||||
float dy = M_PI * ty;
|
float dy = M_PI * ty;
|
||||||
ox += dx * cosf(dy);
|
ox += dx * cosf(dy);
|
||||||
oy += dx * sinf(dy);
|
oy += dx * sinf(dy);
|
||||||
|
}
|
||||||
""")
|
""")
|
||||||
|
|
||||||
var(19, 'power', """
|
var(19, 'power', """
|
||||||
|
Loading…
Reference in New Issue
Block a user