Use x*0 instead of x!=x to detect non-finite values, since x*0 also detects infinities
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 15 May 2012 14:17:36 +0000 (14:17 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 15 May 2012 14:17:36 +0000 (14:17 +0000)
commit30d90ebe7c05b7067f5c67bd8278371c2a355b02
tree6631831b2e72edcff69fd8a7274b06a61e85c0cd
parent63c57613b8b53d142be6d44aed4ef9e3b9d7cf11
Use x*0 instead of x!=x to detect non-finite values, since x*0 also detects infinities
and it is faster (at least faster in SkRect::set).

Add unittest for SkRect::set to see that it correctly detects NaN and infinities.

git-svn-id: http://skia.googlecode.com/svn/trunk@3936 2bbb7eff-a529-9590-31e7-b0007b416f81
src/core/SkRect.cpp
tests/ScalarTest.cpp