From 654c4dbae800a2a75cf738658bab2de5ddae27a9 Mon Sep 17 00:00:00 2001 From: Thang PHAM Date: Tue, 15 Oct 2024 09:21:51 +0200 Subject: [PATCH] [FIX] Rounding problem in modification by formula with 100 percentage --- .../server/modifications/byfilter/ByFormulaModification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/gridsuite/modification/server/modifications/byfilter/ByFormulaModification.java b/src/main/java/org/gridsuite/modification/server/modifications/byfilter/ByFormulaModification.java index ad35e95db..0ce303960 100644 --- a/src/main/java/org/gridsuite/modification/server/modifications/byfilter/ByFormulaModification.java +++ b/src/main/java/org/gridsuite/modification/server/modifications/byfilter/ByFormulaModification.java @@ -105,7 +105,7 @@ private Double applyOperation(Operator operator, @Nonnull Double value1, @Nonnul case SUBTRACTION -> value1 - value2; case MULTIPLICATION -> value1 * value2; case DIVISION -> value1 / value2; - case PERCENTAGE -> (value1 / 100) * value2; + case PERCENTAGE -> (value1 * value2) / 100; }; } }