Last Comment Bug 705200 - Add mozilla::gfx::Matrix::IsIdentity()
: Add mozilla::gfx::Matrix::IsIdentity()
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Mac OS X
-- normal (vote)
: mozilla12
Assigned To: Joe Drew (not getting mail)
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2011-11-24 14:59 PST by Joe Drew (not getting mail)
Modified: 2012-01-05 08:41 PST (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

add IsIdentity() (850 bytes, patch)
2011-11-24 14:59 PST, Joe Drew (not getting mail)
no flags Details | Diff | Splinter Review
add IsIdentity() v2 (856 bytes, patch)
2012-01-04 11:33 PST, Joe Drew (not getting mail)
bas: review+
Details | Diff | Splinter Review

Description User image Joe Drew (not getting mail) 2011-11-24 14:59:27 PST
Created attachment 576831 [details] [diff] [review]
add IsIdentity()

We should be able to tell if a matrix is the identity matrix.
Comment 1 User image Bas Schouten (:bas.schouten) 2011-12-08 12:42:07 PST
Comment on attachment 576831 [details] [diff] [review]
add IsIdentity()

Review of attachment 576831 [details] [diff] [review]:

This is not an uncommon thing to use and will be pretty slow now. I suggest since 1.0 and 0.0 are both well representable in float, we check ==.
Comment 2 User image Joe Drew (not getting mail) 2012-01-04 11:33:56 PST
Created attachment 585824 [details] [diff] [review]
add IsIdentity() v2
Comment 3 User image Bas Schouten (:bas.schouten) 2012-01-04 12:48:46 PST
Comment on attachment 585824 [details] [diff] [review]
add IsIdentity() v2

Review of attachment 585824 [details] [diff] [review]:

I wonder if we want to fuzzyequal or not. I'm thinking it's okay not to, as what someone's really asking is 'did anything happen to this matrix?' most of the time, which is accurately answered here. So this seems fine.
Comment 4 User image Joe Drew (not getting mail) 2012-01-04 15:04:08 PST
Comment 5 User image Marco Bonardo [::mak] 2012-01-05 08:41:52 PST

Note You need to log in before you can comment on or make changes to this bug.