Fix documentation on RegularPolygon (#8164)

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>
This commit is contained in:
Paul Hüber 2023-03-23 00:17:13 +01:00 committed by GitHub
parent ce33354cee
commit 4f16d6e0dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,9 @@ use wgpu::PrimitiveTopology;
/// A regular polygon in the `XY` plane /// A regular polygon in the `XY` plane
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct RegularPolygon { 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, pub radius: f32,
/// Number of sides. /// Number of sides.
pub sides: usize, pub sides: usize,