From 65e3fe35f0494f6f72af24f2b406b08b43279cf4 Mon Sep 17 00:00:00 2001 From: Alisa Mylnikova Date: Wed, 3 Jun 2020 17:38:55 +0700 Subject: [PATCH] Fix #695: Wrong vector rotation --- Source/model/geom2d/Transform.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/model/geom2d/Transform.swift b/Source/model/geom2d/Transform.swift index 206d137a..b0e1f217 100644 --- a/Source/model/geom2d/Transform.swift +++ b/Source/model/geom2d/Transform.swift @@ -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? {