Skip to content

Commit

Permalink
Fix vector2_test::project, hide to_glam_real()
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Jun 5, 2024
1 parent 90665f8 commit e9d5b92
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions godot-core/src/builtin/vectors/vector2i.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ impl Vector2i {
}

/// Converts `self` to the corresponding [`real`] `glam` type.
#[doc(hidden)]
#[inline]
pub fn to_glam_real(self) -> RVec2 {
RVec2::new(self.x as real, self.y as real)
Expand Down
1 change: 1 addition & 0 deletions godot-core/src/builtin/vectors/vector3i.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ impl Vector3i {
}

/// Converts `self` to the corresponding [`real`] `glam` type.
#[doc(hidden)]
#[inline]
pub fn to_glam_real(self) -> RVec3 {
RVec3::new(self.x as real, self.y as real, self.z as real)
Expand Down
1 change: 1 addition & 0 deletions godot-core/src/builtin/vectors/vector4i.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl Vector4i {
}

/// Converts `self` to the corresponding [`real`] `glam` type.
#[doc(hidden)]
#[inline]
pub fn to_glam_real(self) -> RVec4 {
RVec4::new(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ fn project() {
let a = Vector2::new(1.2, -3.4);
let b = Vector2::new(-5.6, 7.8);

assert_eq!(a.project(b), a.as_inner().project(b));
assert_eq_approx!(a.project(b), a.as_inner().project(b));
}

#[itest]
Expand Down

0 comments on commit e9d5b92

Please sign in to comment.