mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-11 05:05:23 +03:00
Fix #695: Wrong vector rotation
This commit is contained in:
parent
e9cfc18280
commit
65e3fe35f0
@ -128,9 +128,9 @@ public final class Transform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func apply(to: Point) -> Point {
|
public func apply(to: Point) -> Point {
|
||||||
let x2 = m11 * to.x + m12 * to.x + dx
|
let x = m11 * to.x + m12 * to.y + dx
|
||||||
let y2 = m21 * to.y + m22 * to.y + dy
|
let y = m21 * to.x + m22 * to.y + dy
|
||||||
return Point(x: x2, y: y2)
|
return Point(x: x, y: y)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func invert() -> Transform? {
|
public func invert() -> Transform? {
|
||||||
|
Loading…
Reference in New Issue
Block a user