You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-26 15:46:23 +00:00
Core: Use Math namespace for constants
This commit is contained in:
@@ -66,14 +66,14 @@ void LightmapProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
||||
int stack_count = 8;
|
||||
int sector_count = 16;
|
||||
|
||||
float sector_step = (Math_PI * 2.0) / sector_count;
|
||||
float stack_step = Math_PI / stack_count;
|
||||
float sector_step = (Math::PI * 2.0) / sector_count;
|
||||
float stack_step = Math::PI / stack_count;
|
||||
|
||||
Vector<Vector3> vertices;
|
||||
float radius = 0.2;
|
||||
|
||||
for (int i = 0; i <= stack_count; ++i) {
|
||||
float stack_angle = Math_PI / 2 - i * stack_step; // starting from pi/2 to -pi/2
|
||||
float stack_angle = Math::PI / 2 - i * stack_step; // starting from pi/2 to -pi/2
|
||||
float xy = radius * Math::cos(stack_angle); // r * cos(u)
|
||||
float z = radius * Math::sin(stack_angle); // r * sin(u)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user