From d7e9c3cc46d616c2fcd1a6e9f73adbb79c6570b4 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Mon, 21 Dec 2020 01:22:15 +0100 Subject: Add previously missing docs where appropriate --- src/math/rect.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/math/rect.rs') 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 { } impl Rect { + /// 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 } } -- cgit v1.2.3-70-g09d2