Skip to content

Commit

Permalink
Fix documentation on RegularPolygon (#8164)
Browse files Browse the repository at this point in the history
A `RegularPolygon` is described by the circumscribed radius, not the
inscribed radius.

## Objective

- Correct documentation for `RegularPolygon`

## Solution

- Use the correct term

---------

Co-authored-by: Paul Hüber <phueber@kernsp.in>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
  • Loading branch information
3 people committed Mar 22, 2023
1 parent ce33354 commit 4f16d6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bevy_render/src/mesh/shape/regular_polygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ use wgpu::PrimitiveTopology;
/// A regular polygon in the `XY` plane
#[derive(Debug, Copy, Clone)]
pub struct RegularPolygon {
/// Inscribed radius in the `XY` plane.
/// Circumscribed radius in the `XY` plane.
///
/// In other words, the vertices of this polygon will all touch a circle of this radius.
pub radius: f32,
/// Number of sides.
pub sides: usize,
Expand Down

0 comments on commit 4f16d6e

Please sign in to comment.