From 1d5042c9e265219dec8da7311879f12ef3ef698b Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Fri, 3 Apr 2020 05:50:40 -0400 Subject: Use Math_TAU and deg2rad/rad2deg in more places and optimize code --- modules/opensimplex/open_simplex_noise.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/opensimplex') diff --git a/modules/opensimplex/open_simplex_noise.cpp b/modules/opensimplex/open_simplex_noise.cpp index e4e2e0613a..a823bcf3b8 100644 --- a/modules/opensimplex/open_simplex_noise.cpp +++ b/modules/opensimplex/open_simplex_noise.cpp @@ -131,10 +131,10 @@ Ref OpenSimplexNoise::get_seamless_image(int p_size) const { float ii = (float)i / (float)p_size; float jj = (float)j / (float)p_size; - ii *= 2.0 * Math_PI; - jj *= 2.0 * Math_PI; + ii *= Math_TAU; + jj *= Math_TAU; - float radius = p_size / (2.0 * Math_PI); + float radius = p_size / Math_TAU; float x = radius * Math::sin(jj); float y = radius * Math::cos(jj); -- cgit v1.2.3