Skip to content

Commit 0efa485

Browse files
flo-dupSo-Fras
andcommitted
Apply suggestions from code review
Co-authored-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com> Signed-off-by: Florian Dupuy <66690739+flo-dup@users.noreply.github.com>
1 parent cb03284 commit 0efa485

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

network-area-diagram/src/main/java/com/powsybl/nad/svg/DefaultEdgeRendering.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ private List<Double> calculateInsertedAngles(int[] nbInsertedAngles, double[] de
258258
}
259259
double extraSpace = deltaAngles[i] - Math.toRadians(slotAperture) * nbAnglesInDelta;
260260
double intraSpace = extraSpace / (nbAnglesInDelta + 1); // space between two added angles and between other edges and first/last angle
261-
double angleStep = (anglesOtherEdges.get(i + 1) - anglesOtherEdges.get(i) - intraSpace) / nbAnglesInDelta;
262-
double startAngle = anglesOtherEdges.get(i) + intraSpace / 2 + angleStep / 2;
261+
double angleStep = intraSpace + Math.toRadians(slotAperture);
262+
double startAngle = anglesOtherEdges.get(i) + intraSpace + Math.toRadians(slotAperture) / 2;
263263
IntStream.range(0, nbAnglesInDelta).mapToDouble(iLoop -> startAngle + iLoop * angleStep).forEach(insertedAngles::add);
264264
}
265265
return insertedAngles;

0 commit comments

Comments
 (0)