You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Use Math_TAU and deg2rad/rad2deg in more places and optimize code
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user