Usually 0/0=NaN and NaN compared with a number would be false.
Maybe the (up-down)/(up+down) is just what AmazingWizard summarized from the code. But from what we have seen of the quality of that codebase I won’t be surprised if it’s literally this expression, division by zero and all. Lol
not if both upvotes and downvotes are zero ❗️
If 0/0 < 0 would error?
If 0 < 0 evaluates false
That makes it even worse???
Usually 0/0=NaN and NaN compared with a number would be false.
Maybe the (up-down)/(up+down) is just what AmazingWizard summarized from the code. But from what we have seen of the quality of that codebase I won’t be surprised if it’s literally this expression, division by zero and all. Lol
The
(upvotes cast - downvotes cast) / (upvotes + downvotes)is what the code itself saysHere’s recalculate_attitude, line 1268 checks that they have at least made 10 votes.