From 28212f70ffc3684caf65b150dc03b733e19a109e Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Thu, 7 Dec 2017 16:25:01 +0000 Subject: [PATCH] Correct the calculation in Math.hypot(). --- classlib/src/main/java/org/teavm/classlib/java/lang/TMath.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/TMath.java b/classlib/src/main/java/org/teavm/classlib/java/lang/TMath.java index 13512312f..2d298daa9 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/TMath.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/TMath.java @@ -219,7 +219,7 @@ public final class TMath extends TObject { } public static double hypot(double x, double y) { - return x * x + y * y; + return sqrt(x * x + y * y); } public static double expm1(double x) {