Skip to content

Commit

Permalink
Utilise new method for 2d circle example. (#15022)
Browse files Browse the repository at this point in the history
# Objective
Replaced the existing instantiation of the 2D Circle in the 2d_shapes.rs
file with the `new` method.
- Ensures consistency in instantiating 2D primitive shapes in the
examples.

## Solution
Replaced the existing instantiation of the 2D Circle in the 2d_shapes.rs
file with the `new` method.
- Ensures consistency in instantiating 2D primitive shapes in the
examples.

## Testing
- None: Should be straight-forward enough to not warrant a test (I will
eat my words if I am wrong).

---
  • Loading branch information
FarmingtonS9 authored Sep 3, 2024
1 parent 8a64b76 commit 323aa70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/2d/2d_shapes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn setup(
commands.spawn(Camera2dBundle::default());

let shapes = [
Mesh2dHandle(meshes.add(Circle { radius: 50.0 })),
Mesh2dHandle(meshes.add(Circle::new(50.0))),
Mesh2dHandle(meshes.add(CircularSector::new(50.0, 1.0))),
Mesh2dHandle(meshes.add(CircularSegment::new(50.0, 1.25))),
Mesh2dHandle(meshes.add(Ellipse::new(25.0, 50.0))),
Expand Down

0 comments on commit 323aa70

Please sign in to comment.