From 179b9360c52b8cebe94dec4ba1c16af9da978942 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Thu, 11 Nov 2021 11:37:57 +0100 Subject: [PATCH] Point3::normalized() is const and does not modify components --- vcg/space/deprecated_point3.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vcg/space/deprecated_point3.h b/vcg/space/deprecated_point3.h index a5e75494..3362a633 100644 --- a/vcg/space/deprecated_point3.h +++ b/vcg/space/deprecated_point3.h @@ -379,7 +379,12 @@ public: } // for compatibility with eigen port - inline Point3 & normalized() { return Normalize(); } + inline Point3 normalized() const + { + Point3 p = *this; + p.Normalize(); + return p; + } /** * Convert to polar coordinates from cartesian coordinates.