Improve documentation

This commit is contained in:
Emil Ernerfeldt
2021-01-17 12:24:13 +01:00
parent 67c0fbdd01
commit 1f2aebc25a
15 changed files with 48 additions and 26 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
use crate::*;
/// left/center/right or top/center/bottom alignment for e.g. anchors and `Layout`s.
/// left/center/right or top/center/bottom alignment for e.g. anchors and layouts.
#[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
+4 -2
View File
@@ -1,4 +1,6 @@
//! Vectors, positions, rectangles etc.
//! Opinionated 2D math library for building GUIs.
//!
//! Includes vectors, positions, rectangles etc.
//!
//! Conventions (unless otherwise specified):
//!
@@ -127,7 +129,7 @@ where
lerp(to, t)
}
/// Like `remap`, but also clamps the value so that the returned value is always in the `to` range.
/// Like [`remap`], but also clamps the value so that the returned value is always in the `to` range.
pub fn remap_clamp<T>(x: T, from: RangeInclusive<T>, to: RangeInclusive<T>) -> T
where
T: Real,