Closed
Description
Previous ID | SR-3941 |
Radar | None |
Original Reporter | ten (JIRA User) |
Type | Bug |
Status | Resolved |
Resolution | Done |
Environment
macOS
Additional Detail from JIRA
Votes | 0 |
Component/s | Foundation |
Labels | Bug |
Assignee | @filip-sakel |
Priority | Medium |
md5: e970db366b17d050e3e21a3f0cbd7b11
Issue Description:
var affine = AffineTransform(scale: 2)
affine.rotate(byRadians: .pi / 4)
print(affine)
Prints: {m11:0.707106781186548, m12:0.707106781186547, m21:-0.707106781186547, m22:0.707106781186548, tX:0.0, tY:0.0}
Expected Result: {m11:1.4142135623731, m12:1.41421356237309, m21:-1.41421356237309, m22:1.4142135623731, tX:0.0, tY:0.0}
I'll tell you what
public mutating func rotate(byRadians angle: CGFloat) {
prepend(AffineTransform(rotationByRadians: angle))
}