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

Fix #695: Wrong vector rotation

This commit is contained in:
Alisa Mylnikova 2020-06-03 17:38:55 +07:00
parent e9cfc18280
commit 65e3fe35f0

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? {