comparison Framework/Toolbox/LinearAlgebra.cpp @ 1477:5732edec7cbd

sorting frames in 3D
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 18 Jun 2020 15:48:59 +0200
parents 30deba7bc8e2
children
comparison
equal deleted inserted replaced
1476:4db187d29731 1477:5732edec7cbd
193 } 193 }
194 194
195 double DotProduct(const Vector& u, const Vector& v) 195 double DotProduct(const Vector& u, const Vector& v)
196 { 196 {
197 if (u.size() != 3 || 197 if (u.size() != 3 ||
198 v.size() != 3) 198 v.size() != 3)
199 { 199 {
200 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 200 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
201 } 201 }
202 202
203 return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2]); 203 return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2]);