Compare commits

...

2 commits

Author SHA1 Message Date
Stephan I. Böttcher
9dc5b2354a ahepamfile: limit get_bananan() to 2 max 2025-07-03 21:05:17 +02:00
Stephan I. Böttcher
ea85517c0f AHEPAM: limit BANANA() to 2 2025-07-03 21:02:27 +02:00
2 changed files with 7 additions and 2 deletions

View file

@ -443,7 +443,9 @@ BEGIN {
function BANANA(d,c, p) {
p -= B0[d,c]
return 1+p*p*(B2[d,c] + p*(B3[d,c] + p*B4[d,c]))
p = 1+p*p*(B2[d,c] + p*(B3[d,c] + p*B4[d,c]))
if (p>2) p = 2
return p
}
function isPulser() {

View file

@ -36,7 +36,10 @@ struct banana {
static double get_banana(struct banana* c, double phase)
{
double p = phase - c->b0;
return ((p * c->b4 + c->b3) * p + c->b2) * p * p + 1;
p = ((p * c->b4 + c->b3) * p + c->b2) * p * p + 1;
if (p > 2)
p = 2;
return p;
}
static int set_banana(const char *arg)