Skip to content

Commit

Permalink
Cast explicitely to float, otherwise Mirah won't detect our method here.
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar committed Apr 27, 2011
1 parent b9c0796 commit d524b4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/DubyFilta/DubyTools.mirah
Expand Up @@ -4,8 +4,8 @@ class DubyTools
end

def recompute_parameters(cutoff:float, resonance:float, mode:float, sampleRate:float)
@r = not_below( (1-resonance) * 10, 0.1 )
@f = not_below( cutoff * sampleRate / 4, 40.0 )
@r = not_below( (1-resonance) * 10, float(0.1) )
@f = not_below( cutoff * sampleRate / 4, float(40.0) )
c = Math.tan(3.141592653589793 * @f / sampleRate)
@c = float((mode == 1) ? (1/c) : c)
@a1 = 1 / ( 1 + @r * @c + @c * @c)
Expand Down

0 comments on commit d524b4a

Please sign in to comment.