This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git

commit 478afa560c059ea6867d9bc2dedf5975f939fdcb
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Fri Apr 25 12:45:19 2025 +0100

    sonar fix: Test negative facing splitter
---
 .../apache/commons/geometry/euclidean/oned/IntervalTest.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/oned/IntervalTest.java
 
b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/oned/IntervalTest.java
index ead9b955..8dacfac0 100644
--- 
a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/oned/IntervalTest.java
+++ 
b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/oned/IntervalTest.java
@@ -637,7 +637,7 @@ class IntervalTest {
         // arrange
         final Interval interval = Interval.full();
         final OrientedPoint splitter = OrientedPoints.fromPointAndDirection(
-                Vector1D.of(1), true, TEST_PRECISION);
+                Vector1D.of(1), false, TEST_PRECISION);
 
         // act
         final Split<Interval> split = interval.split(splitter);
@@ -645,8 +645,8 @@ class IntervalTest {
         // assert
         Assertions.assertEquals(SplitLocation.BOTH, split.getLocation());
 
-        checkInterval(split.getMinus(), Double.NEGATIVE_INFINITY, 1);
-        checkInterval(split.getPlus(), 1, Double.POSITIVE_INFINITY);
+        checkInterval(split.getMinus(), 1, Double.POSITIVE_INFINITY);
+        checkInterval(split.getPlus(), Double.NEGATIVE_INFINITY, 1);
     }
 
     @Test
@@ -654,7 +654,7 @@ class IntervalTest {
         // arrange
         final Interval interval = Interval.min(-1, TEST_PRECISION);
         final OrientedPoint splitter = OrientedPoints.fromPointAndDirection(
-                Vector1D.of(1), false, TEST_PRECISION);
+                Vector1D.of(1), true, TEST_PRECISION);
 
         // act
         final Split<Interval> split = interval.split(splitter);
@@ -662,8 +662,8 @@ class IntervalTest {
         // assert
         Assertions.assertEquals(SplitLocation.BOTH, split.getLocation());
 
-        checkInterval(split.getMinus(), 1, Double.POSITIVE_INFINITY);
-        checkInterval(split.getPlus(), -1, 1);
+        checkInterval(split.getMinus(), -1, 1);
+        checkInterval(split.getPlus(), 1, Double.POSITIVE_INFINITY);
     }
 
 

Reply via email to