diff options
author | 2012-08-03 18:12:20 +0000 | |
---|---|---|
committer | 2012-08-03 18:12:20 +0000 | |
commit | 0a7672f85ef7655b343679609d02018f83fcfc23 (patch) | |
tree | 182413e9da8c9e33040b7fd22bd0e5ec912a45bd /include/core/SkRandom.h | |
parent | a9e937c7b712b024de108fa963f92d0e70e4a296 (diff) |
Add morphology, convolution, single texture, texture domain effects to new unit test system
Review URL: http://codereview.appspot.com/6442085/
git-svn-id: http://skia.googlecode.com/svn/trunk@4951 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkRandom.h')
-rw-r--r-- | include/core/SkRandom.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/core/SkRandom.h b/include/core/SkRandom.h index b1b7564b1f..c033f407c1 100644 --- a/include/core/SkRandom.h +++ b/include/core/SkRandom.h @@ -81,6 +81,13 @@ public: SkScalar nextUScalar1() { return SkFixedToScalar(this->nextUFixed1()); } /** Return the next pseudo random number expressed as a SkScalar + in the range [min..max). + */ + SkScalar nextRangeScalar(SkScalar min, SkScalar max) { + return SkScalarMul(this->nextSScalar1(), (max - min)) + min; + } + + /** Return the next pseudo random number expressed as a SkScalar in the range (-SK_Scalar1..SK_Scalar1). */ SkScalar nextSScalar1() { return SkFixedToScalar(this->nextSFixed1()); } |