mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 23:20:29 -05:00
Changed segment count calculation from trunc() to ceil() in createSubSegmentMDPairs for more intuitive behavior. When a distance divides evenly by maxSegmentLength, ceil() correctly calculates the exact number of segments needed, while trunc() + 1 would create an unnecessary extra segment. Example: For 100 units with maxSegmentLength=50: - Old: trunc(100/50) + 1 = 3 segments of 33.33 units each - New: ceil(100/50) = 2 segments of 50 units each Also added 20 comprehensive unit tests for createSubSegmentMDPairs.