From 422375bd98690059c55c7e104a65a9dd69d56b21 Mon Sep 17 00:00:00 2001 From: Rob Duquette <132164984+robqduquette@users.noreply.github.com> Date: Thu, 13 Mar 2025 23:37:28 -0400 Subject: [PATCH] Fixed bug in LineModulation from set of points where oPointsDummyFunc would extrapolate from the next two points instead of interpolate between the current two. --- ShapeKernel/Modulations/LineModulation(1D).cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ShapeKernel/Modulations/LineModulation(1D).cs b/ShapeKernel/Modulations/LineModulation(1D).cs index d66e229..ce32200 100644 --- a/ShapeKernel/Modulations/LineModulation(1D).cs +++ b/ShapeKernel/Modulations/LineModulation(1D).cs @@ -5,7 +5,7 @@ // specifically for use in Computational Engineering Models (CEM). // // For more information, please visit https://leap71.com/shapekernel -// +// // This project is developed and maintained by LEAP 71 - © 2024 by LEAP 71 // https://leap71.com // @@ -15,8 +15,8 @@ // We have developed this library to be used widely, for both commercial and // non-commercial projects alike. Therefore, have released it under a permissive // open-source license. -// -// The LEAP 71 ShapeKernel is based on the PicoGK compact computational geometry +// +// The LEAP 71 ShapeKernel is based on the PicoGK compact computational geometry // framework. See https://picogk.org for more information. // // LEAP 71 licenses this file to you under the Apache License, Version 2.0 @@ -29,7 +29,7 @@ // PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. // // See the License for the specific language governing permissions and -// limitations under the License. +// limitations under the License. // @@ -150,7 +150,7 @@ protected float oPointsDummyFunc(float fRatio) fCurrentRatio = m_aDiscretePoints[i].Z; fNextRatio = m_aDiscretePoints[i + 1].Z; } - if (fCurrentRatio >= fRatio) + if (fNextRatio >= fRatio) { fLowerRatio = fCurrentRatio; dS = fRatio - fLowerRatio; @@ -289,7 +289,7 @@ protected class ModulationMultiplication { protected float m_fFactor; protected LineModulation m_oMod; - + protected ModulationMultiplication( float fFactor, LineModulation oMod)