diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2017-01-12 18:02:45 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-06-14 10:53:29 +0000 |
commit | 02e960493ef9a2f8dc25a06616fbde8fd869d1af (patch) | |
tree | 921324b1538455f0f058653adebb8a9f71bd98e0 /examples | |
parent | aecc8d26eca1cee6eee04e24a0b10e374f33a6c8 (diff) |
Be (somewhat more) consistent about the value of pi
Use qmath.h's value for M_PI in shaders, rather than a value less
precise than even float holds.
Task-number: QTBUG-58083
Change-Id: I3cf30a0900216b1d7d6dc54d4c5676592ba503a0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qt3d/wave/shaders/ribbon.vert | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/qt3d/wave/shaders/ribbon.vert b/examples/qt3d/wave/shaders/ribbon.vert index e099d53c8..2ff9d2729 100644 --- a/examples/qt3d/wave/shaders/ribbon.vert +++ b/examples/qt3d/wave/shaders/ribbon.vert @@ -111,7 +111,7 @@ float snoise(vec3 v) float height( const in vec3 pos ) { // Perturb the y position by a wave function in (x, t) - const float twoPi = 2.0 * 3.14159; + const float twoPi = 2.0 * 3.14159265358979323846; float k = twoPi / lambda; float omega = twoPi / period; |