Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1861)

Issue 7201058: Fix nextRangeU(0, MAX_UINT) div by zero. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by bsalomon
Modified:
11 years, 10 months ago
Reviewers:
reed1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fix nextRangeU(0, MAX_UINT) div by zero. R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=7400

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M include/utils/SkRandom.h View 1 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 3
bsalomon
11 years, 10 months ago (2013-01-25 19:01:59 UTC) #1
reed1
Curious: do you find range = max - min 0 == ~range % (range + ...
11 years, 10 months ago (2013-01-25 19:07:04 UTC) #2
bsalomon
11 years, 10 months ago (2013-01-25 19:17:08 UTC) #3
On 2013/01/25 19:07:04, reed1 wrote:
> Curious: do you find
> 
> range = max - min
> 0 == ~range
> % (range + 1)
> 
> clearer to read than
> 
> range = max - min + 1
> 0 == range
> % range

I dunno, doesn't really matter to me. I suppose the use of the word "range" in
the second version is more accurate.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b