From 08685122eae96012875217dccb7ce9fc131aa434 Mon Sep 17 00:00:00 2001 From: sebcrozet Date: Thu, 20 Sep 2018 20:01:48 +0200 Subject: [PATCH] Fix projective * point multiplication. The scaling did not occur at the right time. --- src/geometry/transform_ops.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/geometry/transform_ops.rs b/src/geometry/transform_ops.rs index 41bf80f4..0e2b4826 100644 --- a/src/geometry/transform_ops.rs +++ b/src/geometry/transform_ops.rs @@ -145,7 +145,7 @@ md_impl_all!( let n = normalizer.tr_dot(&rhs.coords) + unsafe { *self.matrix().get_unchecked(D::dim(), D::dim()) }; if !n.is_zero() { - return transform * (rhs / n) + translation; + return (transform * rhs + translation) / n; } }