Added ScalarType Length() const function

This commit is contained in:
Nico Pietroni 2009-06-30 16:13:19 +00:00
parent 7c6296c80d
commit 24cf3c430a
1 changed files with 6 additions and 1 deletions

View File

@ -101,7 +101,12 @@ public:
/// returns segment length /// returns segment length
ScalarType Length() ScalarType Length()
{ return (_p0 - _p1).Norm(); } { return (_p0 - _p1).Norm(); }
/// return segment squared lenght
/// returns segment length
ScalarType Length() const
{ return (_p0 - _p1).Norm(); }
/// return segment squared lenght
ScalarType SquaredLength() ScalarType SquaredLength()
{ return (_p0 - _p1).SquaredNorm(); } { return (_p0 - _p1).SquaredNorm(); }
/// flips: a-b becomes b-a /// flips: a-b becomes b-a