mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Improve documentation
This commit is contained in:
@@ -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"))]
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user