Skip to content
Snippets Groups Projects
Commit 7beb4914 authored by Amaury Vanoorenberghe's avatar Amaury Vanoorenberghe :scroll:
Browse files

FIX - Réparation des formules de conversion de degrés NEwton pour passer

les tests Q2_2:test_Newton_to_kelvin et Q2_3:test_temperature_Newton
parent 2f32f64e
No related branches found
No related tags found
No related merge requests found
...@@ -61,13 +61,13 @@ public class Conversions { ...@@ -61,13 +61,13 @@ public class Conversions {
// === NEWTON === // === NEWTON ===
public static Double NEWTON_OFFSET = CELSIUS_OFFSET; public static Double NEWTON_OFFSET = CELSIUS_OFFSET;
public static Double NEWTON_FACTOR = 0.33; public static Double NEWTON_FACTOR = 100.0 / 33.0;
public static Double kelvinToNewton(Double kelvin) { public static Double kelvinToNewton(Double kelvin) {
return (kelvin - NEWTON_OFFSET) * NEWTON_FACTOR; return (kelvin - NEWTON_OFFSET) / NEWTON_FACTOR;
} }
public static Double newtonToKelvin(Double newton) { public static Double newtonToKelvin(Double newton) {
return (newton / NEWTON_FACTOR) + NEWTON_FACTOR; return (newton * NEWTON_FACTOR) + NEWTON_OFFSET;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment