1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-08-15 16:10:39 +03:00

Merge pull request #696 from f3dm76/fix/vector-rotation

Fix #695: Wrong vector rotation
This commit is contained in:
Yuri Strot 2020-06-03 17:40:50 +07:00 committed by GitHub
commit b07f097e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,9 +128,9 @@ public final class Transform {
}
public func apply(to: Point) -> Point {
let x2 = m11 * to.x + m12 * to.x + dx
let y2 = m21 * to.y + m22 * to.y + dy
return Point(x: x2, y: y2)
let x = m11 * to.x + m12 * to.y + dx
let y = m21 * to.x + m22 * to.y + dy
return Point(x: x, y: y)
}
public func invert() -> Transform? {