Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4836] iOS: 2dmatrix rotation value is not rotating when its end value is where it starts

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2013-07-29T23:36:47.000+0000
Affected Version/sRelease 1.8.0
Fix Version/s2013 Sprint 16, 2013 Sprint 16 API
ComponentsiOS
Labels2dmatrix, core, rotate
ReporterNatalie Huynh
AssigneeIngo Muschenetz
Created2011-07-29T13:17:00.000+0000
Updated2017-03-03T22:46:36.000+0000

Description

Steps to Reproduce: 1. Run the attached .js file 2. Click on the blue square Actual Result Nothing happens Expected Result: Should rotate the blue object -360 degree and the red object 360 degree

Attachments

FileDateSize
app.js2011-07-29T13:17:00.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 full rotations.
  3. Lee Morris 2017-03-03

    Closing as invalid.

JSON Source