You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: crates/bevy_math/src/primitives/dim2.rs
+15-12
Original file line number
Diff line number
Diff line change
@@ -180,9 +180,11 @@ impl Circle {
180
180
///
181
181
/// An arc has no area.
182
182
/// If you want to include the portion of a circle's area swept out by the arc,
183
-
/// use [CircularSector].
183
+
/// use [`CircularSector`].
184
+
/// If you want to include only the space inside the convex hull of the arc,
185
+
/// use [`CircularSegment`].
184
186
///
185
-
/// The arc is drawn starting from [Vec2::X], going counterclockwise.
187
+
/// The arc is drawn starting from [`Vec2::X`], going counterclockwise.
186
188
/// To orient the arc differently, apply a rotation.
187
189
/// The arc is drawn with the center of its circle at the origin (0, 0),
188
190
/// meaning that the center may not be inside its convex hull.
@@ -197,7 +199,7 @@ pub struct Arc {
197
199
implPrimitive2dforArc{}
198
200
199
201
implDefaultforArc{
200
-
// Returns the default [`Arc`] with radius `0.5` and angle `1.0`.
202
+
/// Returns the default [`Arc`] with radius `0.5` and angle `1.0`.
201
203
fndefault() -> Self{
202
204
Self{
203
205
radius:0.5,
@@ -282,8 +284,9 @@ impl Arc {
282
284
/// the length of the line between the midpoints of the arc and its chord.
283
285
/// Equivalently, the height of the triangle whose base is the chord and whose apex is the midpoint of the arc.
284
286
///
285
-
/// If the arc is minor, i.e. less than half the circle, the this will be the difference of the [radius](Self::radius) and the [apothem](Self::apothem).
286
-
/// If it is [major](Self::major), it will be their sum.
287
+
/// If the arc is minor, i.e. less than half the circle, the this will be the difference of the [`radius`](Self::radius)
288
+
/// and the [`apothem`](Self::apothem_len).
289
+
/// If the arc is [major](Self::is_major), it will be their sum.
287
290
#[inline(always)]
288
291
pubfnsagitta_len(&self) -> f32{
289
292
ifself.is_major(){
@@ -302,7 +305,7 @@ impl Arc {
302
305
303
306
/// A primitive representing a circular sector: a pie slice of a circle.
304
307
///
305
-
/// The sector is drawn starting from [Vec2::X], going counterclockwise.
308
+
/// The sector is drawn starting from [`Vec2::X`], going counterclockwise.
306
309
/// To orient the sector differently, apply a rotation.
307
310
/// The sector is drawn with the center of its circle at the origin (0, 0).
308
311
#[derive(Clone,Copy,Debug,PartialEq)]
@@ -315,7 +318,7 @@ pub struct CircularSector {
315
318
implPrimitive2dforCircularSector{}
316
319
317
320
implDefaultforCircularSector{
318
-
// Returns the default [`CircularSector`] with radius `0.5` and angle `1.0`.
321
+
/// Returns the default [`CircularSector`] with radius `0.5` and angle `1.0`.
319
322
fndefault() -> Self{
320
323
Arc::default().into()
321
324
}
@@ -328,7 +331,7 @@ impl From<Arc> for CircularSector {
328
331
}
329
332
330
333
implCircularSector{
331
-
/// Create a new [CircularSector] from a `radius`, and an `angle`
334
+
/// Create a new [`CircularSector`] from a `radius`, and an `angle`
332
335
#[inline(always)]
333
336
pubfnnew(radius:f32,angle:f32) -> Self{
334
337
Arc::new(radius, angle).into()
@@ -344,10 +347,10 @@ impl CircularSector {
344
347
/// A primitive representing a circular segment:
345
348
/// the area enclosed by the arc of a circle and its chord (the line between its endpoints).
346
349
///
347
-
/// The segment is drawn starting from [Vec2::X], going counterclockwise.
350
+
/// The segment is drawn starting from [`Vec2::X`], going counterclockwise.
348
351
/// To orient the segment differently, apply a rotation.
349
352
/// The segment is drawn with the center of its circle at the origin (0, 0).
350
-
/// When positioning the segment, the [apothem_len](Self::apothem) and [sagitta_len](Sagitta) functions
353
+
/// When positioning the segment, the [`apothem_len`](Arc::apothem_len) and [`sagitta_len`](Arc::sagitta_len) functions
0 commit comments