Skip to content

Commit cf45421

Browse files
committed
Rect2i, Gd: minor doc update
1 parent 512c5a6 commit cf45421

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

godot-core/src/builtin/rect2i.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,12 @@ impl Rect2i {
8383
}
8484

8585
/// The end of the `Rect2i` calculated as `position + size`.
86-
///
87-
/// _Godot equivalent: `Rect2i.size` property_
88-
#[doc(alias = "size")]
8986
#[inline]
9087
pub const fn end(self) -> Vector2i {
9188
Vector2i::new(self.position.x + self.size.x, self.position.y + self.size.y)
9289
}
9390

94-
/// Set size based on desired end-point.
95-
///
96-
/// _Godot equivalent: `Rect2i.size` property_
91+
/// Set end of the `Rect2i`, updating `size = end - position`.
9792
#[inline]
9893
pub fn set_end(&mut self, end: Vector2i) {
9994
self.size = end - self.position
@@ -110,8 +105,7 @@ impl Rect2i {
110105

111106
/// Returns `true` if this `Rect2i` completely encloses another one.
112107
///
113-
/// Any `Rect2i` encloses itself, i.e. an enclosed `Rect2i` does is not required to be a
114-
/// proper sub-rect.
108+
/// Any `Rect2i` encloses itself, i.e. an enclosed `Rect2i` does is not required to be a proper sub-rect.
115109
#[inline]
116110
pub const fn encloses(self, other: Self) -> bool {
117111
self.assert_nonnegative();

godot-core/src/obj/gd.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,11 @@ impl<T: GodotClass> Gd<T> {
294294

295295
/// Returns the dynamic class name of the object as `StringName`.
296296
///
297-
/// This method retrieves the class name of the object at runtime, which can be different from [`T::class_name()`] if derived
298-
/// classes are involved.
297+
/// This method retrieves the class name of the object at runtime, which can be different from [`T::class_name()`][GodotClass::class_name]
298+
/// if derived classes are involved.
299299
///
300-
/// Unlike [`Object::get_class()`], this returns `StringName` instead of `GString` and needs no `Inherits<Object>` bound.
300+
/// Unlike [`Object::get_class()`][crate::classes::Object::get_class], this returns `StringName` instead of `GString` and needs no
301+
/// `Inherits<Object>` bound.
301302
pub(crate) fn dynamic_class_string(&self) -> StringName {
302303
unsafe {
303304
StringName::new_with_string_uninit(|ptr| {

0 commit comments

Comments
 (0)