Skip to content
Browse files

Fixed typo in compute_news_rank().

  • Loading branch information...
1 parent c889482 commit 2ff998a290f7e6dd9c2a9d9fd187573a75313e1b @antirez committed Mar 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app.rb
View
2 app.rb
@@ -1235,7 +1235,7 @@ def compute_news_score(news)
#
# The general forumla is RANK = SCORE / (AGE ^ AGING_FACTOR)
def compute_news_rank(news)
- age = (Time.now.to_i - news["ctime"].to_i)+NewsAgePadding
+ age = (Time.now.to_i - news["ctime"].to_i)
return 0 if (age > TopNewsAgeLimit)
return ((news["score"].to_f-1)*1000000)/((age+NewsAgePadding)**RankAgingFactor)
end

0 comments on commit 2ff998a

Please sign in to comment.
Something went wrong with that request. Please try again.