Closed Bug 705200 Opened 13 years ago Closed 13 years ago

Add mozilla::gfx::Matrix::IsIdentity()

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: joe, Assigned: joe)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch add IsIdentity() (obsolete) — Splinter Review
We should be able to tell if a matrix is the identity matrix.
Attachment #576831 - Flags: review?(bas.schouten)
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 ==.
Assignee: nobody → joe
Attachment #576831 - Attachment is obsolete: true
Attachment #576831 - Flags: review?(bas.schouten)
Attachment #585824 - Flags: review?(bas.schouten)
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.
Attachment #585824 - Flags: review?(bas.schouten) → review+
https://hg.mozilla.org/mozilla-central/rev/ec3401e5a7b8
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: