util: introduce SQUARE macro

This commit is contained in:
Miroslav Lichvar
2018-08-17 11:16:44 +02:00
parent a1f2f17385
commit 0b709ab1bc
6 changed files with 15 additions and 30 deletions

View File

@@ -144,7 +144,7 @@ update_stages(void)
is equal to the offset that should be smoothed out */
s1 = smooth_offset / max_wander;
s2 = smooth_freq * smooth_freq / (2.0 * max_wander * max_wander);
s2 = SQUARE(smooth_freq) / (2.0 * SQUARE(max_wander));
/* Calculate the lengths of the 1st and 3rd stage assuming there is no
frequency limit. The direction of the 1st stage is selected so that