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

RESOLVED FIXED in mozilla12

Status

()

defect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: joe, Assigned: joe)

Tracking

Trunk
mozilla12
x86
macOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Posted 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: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.