Merge pull request #37547 from aaronfranke/tau
Use Math_TAU and deg2rad/etc in more places and optimize code
This commit is contained in:
commit
d2e1216504
34 changed files with 149 additions and 130 deletions
|
|
@ -131,10 +131,10 @@ Ref<Image> 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue