Skip to content

Commit 5d08dae

Browse files
committed
Derive default for Plane
1 parent b99fe33 commit 5d08dae

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

godot-core/src/builtin/plane.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ impl Plane {
109109
}
110110
}
111111

112+
/// Creates a new `Plane` with default values. This new `Plane` will be invalid.
113+
///
114+
/// _Godot equivalent: `Plane()`_
115+
#[inline]
116+
pub fn invalid() -> Self {
117+
Self {
118+
normal: Default::default(),
119+
d: Default::default(),
120+
}
121+
}
122+
112123
/// Finds the shortest distance between the plane and a point.
113124
///
114125
/// The distance will be positive if `point` is above the plane, and will be negative if

0 commit comments

Comments
 (0)