Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4837] iOS: 2dmatrix rotation is transforming object the same way regardless of +/- value

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2013-07-29T23:37:52.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sn/a
ComponentsiOS
Labelscore
ReporterNatalie Huynh
AssigneeIngo Muschenetz
Created2011-07-29T13:30:57.000+0000
Updated2017-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

FileDateSize
app.js2011-07-29T13:31:09.000+00001143

Comments

  1. Blain Hamon 2013-07-29

    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.
  2. Blain Hamon 2013-07-29

    2D matrices use sin and cos, and thus won't represent the direction of rotations.
  3. Lee Morris 2017-03-13

    Closing ticket as invalid.

JSON Source