mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
RigWellPath: Fix interpolation in RigWellPath::closestMeasuredDepth
This commit is contained in:
@@ -391,8 +391,8 @@ double RigWellPath::closestMeasuredDepth( const cvf::Vec3d& position ) const
|
|||||||
cvf::Vec3d p1 = m_wellPathPoints[firstIndex];
|
cvf::Vec3d p1 = m_wellPathPoints[firstIndex];
|
||||||
cvf::Vec3d p2 = m_wellPathPoints[secondIndex];
|
cvf::Vec3d p2 = m_wellPathPoints[secondIndex];
|
||||||
|
|
||||||
double diffP1 = ( p1 - position ).lengthSquared();
|
double diffP1 = ( p1 - position ).length();
|
||||||
double diffP2 = ( p2 - position ).lengthSquared();
|
double diffP2 = ( p2 - position ).length();
|
||||||
|
|
||||||
double weigth1 = diffP2 / ( diffP1 + diffP2 );
|
double weigth1 = diffP2 / ( diffP1 + diffP2 );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user