spullen/ActsAsRecommendable — Issue #7: Clean up return on pearson correlation
Author: spullen
Created: 2011-12-16 13:19:18+00:00
State: open

The return of the pearson correlation similarity looks a bit messy.

Currently it looks like:

if den == 0
return 0
else
return num / den
end

Make it:

return (den == 0 ? 0 : (num / den))