3/12/14

I often do this wrong: I want a number to bottom out at 0 — so that zero is the minimum value the number can be — so I do this:

number = Math.min(0, number)

Which is wrong. It should be:

number = Math.max(0, number)

But how to remember this?

1 comment:

  1. Slot machines - Dr.D.C.
    Play slot machines for 시흥 출장샵 fun. With thousands 경기도 출장샵 of free slots, casinos have a choice. You can play online slots, 평택 출장샵 blackjack, 여주 출장마사지 roulette and more. 광주 출장샵 You can play casino

    ReplyDelete