[TIMOB-4837] iOS: 2dmatrix rotation is transforming object the same way regardless of +/- value
| GitHub Issue | n/a |
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2013-07-29T23:37:52.000+0000 |
| Affected Version/s | Release 1.8.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | core |
| Reporter | Natalie Huynh |
| Assignee | Ingo Muschenetz |
| Created | 2011-07-29T13:30:57.000+0000 |
| Updated | 2017-03-13T17:49:25.000+0000 |
Description
Steps to Reproduce:
1. Run the attached .js file
2. Click on the red square
Actual Result
both rotates counter clockwise
Expected Result:
Blue should rotate counter clockwise
Red should rotate clockwise
Attachments
| File | Date | Size |
| app.js | 2011-07-29T13:31:09.000+0000 | 1143 |
This is due to how rotations are implemented: iOS uses a pure mathematical 2D matrix, Android does not, and stores a rotation as a value as opposed to sin and cos values. A 2D matrix is a 2*3 matrix that can be used on (x,y) points to shear, scale, translate, and rotate an image. The values are stateless, and do not indicate a direction or path, only the final effect. To represent rotation of θ, sin(θ) and cos(θ) values are used. Note that because sin(360° + θ) is the same as sin(θ), and cos(360° + θ) also has no difference, there is no way to mathematically express a full rotation. Marking as invalid due to math.
2D matrices use sin and cos, and thus won't represent the direction of rotations.
Closing ticket as invalid.