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

GitHub Issue | n/a |
---|---|

Type | Bug |

Priority | Medium |

Status | Closed |

Resolution | Invalid |

Resolution Date | 2013-07-29T23:36:47.000+0000 |

Affected Version/s | Release 1.8.0 |

Fix Version/s | 2013 Sprint 16, 2013 Sprint 16 API |

Components | iOS |

Labels | 2dmatrix, core, rotate |

Reporter | Natalie Huynh |

Assignee | Ingo Muschenetz |

Created | 2011-07-29T13:17:00.000+0000 |

Updated | 2017-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

File | Date | Size |
---|---|---|

app.js | 2011-07-29T13:17:00.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 full rotations.

Closing as invalid.