From 978c3f39fbfe77dba2f012be72da8edbd36620a4 Mon Sep 17 00:00:00 2001 From: Mo8it Date: Fri, 14 Jan 2022 13:26:51 +0100 Subject: [PATCH] sqrt in elliptical_distance --- src/Shape.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Shape.jl b/src/Shape.jl index 9975b5c..7b7419b 100644 --- a/src/Shape.jl +++ b/src/Shape.jl @@ -6,7 +6,7 @@ export center_of_mass, using StaticArrays: SVector, SMatrix using LinearAlgebra: eigvals, eigvecs, Hermitian, dot -using ..ReCo: Particle +using ..ReCo: ReCo, Particle function project_to_unit_circle(x::Float64, half_box_len::Float64) φ = (x + half_box_len) * π / half_box_len @@ -126,7 +126,7 @@ function elliptical_distance( x = dot(v′, gyration_tensor_eigvec_to_bigger_eigval) y = dot(v′, gyration_tensor_eigvec_to_smaller_eigval) - return x^2 + (y / goal_gyration_tensor_eigvals_ratio)^2 + return sqrt(x^2 + (y / goal_gyration_tensor_eigvals_ratio)^2) end end # module \ No newline at end of file