Skip to content

Commit

Permalink
Merge pull request godot-rust#456 from you-win/fix/derive-default-plane
Browse files Browse the repository at this point in the history
Derive default for Plane
  • Loading branch information
Bromeon authored Oct 23, 2023
2 parents b99fe33 + 5d08dae commit 01787a7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions godot-core/src/builtin/plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ impl Plane {
}
}

/// Creates a new `Plane` with default values. This new `Plane` will be invalid.
///
/// _Godot equivalent: `Plane()`_
#[inline]
pub fn invalid() -> Self {
Self {
normal: Default::default(),
d: Default::default(),
}
}

/// Finds the shortest distance between the plane and a point.
///
/// The distance will be positive if `point` is above the plane, and will be negative if
Expand Down

0 comments on commit 01787a7

Please sign in to comment.