summaryrefslogtreecommitdiff
path: root/lib/algorithm.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/algorithm.rb')
-rw-r--r--lib/algorithm.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index c8cb116..167c964 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -246,7 +246,7 @@ module OpenTox
# Gauss kernel
# @return [Float]
def self.gauss(x, sigma = 0.3)
- d = 1.0 - x
+ d = 1.0 - x.to_f
Math.exp(-(d*d)/(2*sigma*sigma))
end