From 24cf3c430a42ba656274e911e84a1ee4a3aef31f Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Tue, 30 Jun 2009 16:13:19 +0000 Subject: [PATCH] Added ScalarType Length() const function --- vcg/space/segment2.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vcg/space/segment2.h b/vcg/space/segment2.h index 5f7b0fe9..c16c7f61 100644 --- a/vcg/space/segment2.h +++ b/vcg/space/segment2.h @@ -101,7 +101,12 @@ public: /// returns segment length ScalarType Length() { return (_p0 - _p1).Norm(); } - /// return segment squared lenght + + /// returns segment length + ScalarType Length() const + { return (_p0 - _p1).Norm(); } + + /// return segment squared lenght ScalarType SquaredLength() { return (_p0 - _p1).SquaredNorm(); } /// flips: a-b becomes b-a