summaryrefslogtreecommitdiffstats
path: root/examples/qt3d
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d')
-rw-r--r--examples/qt3d/planets-qml/SolarSystem.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/qt3d/planets-qml/SolarSystem.qml b/examples/qt3d/planets-qml/SolarSystem.qml
index f9353d6dc..3a717e62a 100644
--- a/examples/qt3d/planets-qml/SolarSystem.qml
+++ b/examples/qt3d/planets-qml/SolarSystem.qml
@@ -395,7 +395,7 @@ Entity {
var v = Math.atan2(yv, xv)
// Calculate the distance (radius)
- var r = Math.sqrt(xv * xv + yv * yv)
+ var r = Math.hypot(xv, yv)
// From http://www.davidcolarusso.com/astro/
// Modified to compensate for the right handed coordinate system of OpenGL