diff options
| author | Arne Dußin | 2020-12-21 01:22:15 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-12-21 21:15:55 +0100 |
| commit | d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4 (patch) | |
| tree | e5633f4d3b18472922c943d759e9f58722ba4405 /src/math/rect.rs | |
| parent | 48f321a80970ebeb8374072b1d2e0a4d297aa348 (diff) | |
| download | graf_karto-d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4.tar.gz graf_karto-d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4.zip | |
Add previously missing docs where appropriate
Diffstat (limited to 'src/math/rect.rs')
| -rw-r--r-- | src/math/rect.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/math/rect.rs b/src/math/rect.rs index b571644..6f993d1 100644 --- a/src/math/rect.rs +++ b/src/math/rect.rs @@ -1,3 +1,5 @@ +//! Rectangles where the sides are parallel to the x and y-axes. + use super::{LineSegment, Polygon, Surface, Vec2}; //use alga::general::{Additive, Identity}; use nalgebra::{ClosedAdd, ClosedSub, RealField, Scalar}; @@ -20,6 +22,8 @@ pub struct Rect<T: Scalar + Copy> { } impl<T: Scalar + Copy> Rect<T> { + /// Create a new Rectangle from the internal values, where it might be nicer to use a function + /// instead of setting the values directly. pub fn new(x: T, y: T, w: T, h: T) -> Self { Self { x, y, w, h } } |
