aboutsummaryrefslogtreecommitdiff
path: root/src/math/rect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/rect.rs')
-rw-r--r--src/math/rect.rs4
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 }
}