From 439cdbf74601c9269fa979f34d4b5986a6942e77 Mon Sep 17 00:00:00 2001 From: Aron T Date: Thu, 19 Sep 2024 22:10:48 +0300 Subject: [PATCH] fix reflection --- src/linear_algebra.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/linear_algebra.jl b/src/linear_algebra.jl index 82e74a9..aa66f26 100644 --- a/src/linear_algebra.jl +++ b/src/linear_algebra.jl @@ -81,10 +81,10 @@ end """ function reflection(v::Vector, w::Vector) -> Vector -The projection P from 'w' onto 'v' is the midpoint of the reflection of w around v +The projection P from 'v' to the line along [1,2] is the midpoint of the reflection of w around v """ -function reflection(v::Vector, w::Vector) - P = orthproj(v,w) +function reflection(v::Vector) + P = orthproj([1,2],v) (2 * P ) - X end