5

I thought the Red color was used to indicate a negative score. But then I see this:

enter image description here

It seems to me that the selection for the Red color is a score > 0? Green : Red when it should be score >= 0 ? Green : Red

Since zero is, ya know, not a negative number.

2 Answers 2

14

The choice is that it can either be Green or Red. The solution would be to either make it Green or...

Make zero black!

Since it's neither positive nor negative, it shouldn't be green or red, but black.

score == 0 ? black : score > 0 ? green : red;

4
  • 10
    A third color? You're a madman Oct 22, 2011 at 16:15
  • 1
    @Richard - Do you understand what you asking for here? The algorithms needed? Good-luck, and Godspeed. Oct 22, 2011 at 17:36
  • I know! The thousands of manhours required! Maybe if we got an infinite amount of monkeys...
    – Richard
    Oct 22, 2011 at 20:32
  • This will happen in the next build, for sites with the new reputation system rolled out (meta only for the moment, everywhere else soon). Feb 28, 2012 at 19:34
3

Zero is not negative or positive; it is neutral. That's likely why it is labelled as negative since you got nothing positive.

5
  • 10
    In IEEE floating points there is a positive and a negative zero! :-) (this comment is totally useless, but this is a meta-board of the biggest programming board around, so it's ok enough to point it, I think)
    – xanatos
    Oct 22, 2011 at 14:04
  • @xanatos Haha that is true. +1! Oct 22, 2011 at 14:08
  • 2
    Using your flawless logic, I got nothing negative either.
    – Richard
    Oct 22, 2011 at 16:09
  • @Richard I think you took my answer the wrong way there. Oct 22, 2011 at 16:37
  • 3
    @SimonSheehan: You're right. +0 to you. Feb 28, 2012 at 20:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .