Skip to content

Commit

Permalink
Reword the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-blackbird committed Dec 3, 2023
1 parent 5412723 commit 5f0a993
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions crates/bevy_math/src/primitives/dim2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ pub struct Direction2d(Vec2);
impl Direction2d {
/// Create a direction from a finite, nonzero [`Vec2`].
///
/// If the input is zero (or very close to zero), or non-finite,
/// the result of this operation will be `None`.
/// Returns `None` if the input is zero (or very close to zero), or non-finite.
pub fn new(value: Vec2) -> Option<Self> {
value.try_normalize().map(Self)
}
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_math/src/primitives/dim3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ pub struct Direction3d(Vec3);
impl Direction3d {
/// Create a direction from a finite, nonzero [`Vec3`].
///
/// If the input is zero (or very close to zero), or non-finite,
/// the result of this operation will be `None`.
/// Returns `None` if the input is zero (or very close to zero), or non-finite.
pub fn new(value: Vec3) -> Option<Self> {
value.try_normalize().map(Self)
}
Expand Down

0 comments on commit 5f0a993

Please sign in to comment.