Skip to content

Commit f369c50

Browse files
committed
Fix errors and comments
1 parent feab0c8 commit f369c50

File tree

1 file changed

+10
-10
lines changed
  • crates/bevy_geometry/src

1 file changed

+10
-10
lines changed

crates/bevy_geometry/src/lib.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ pub struct Sphere {
3838
}
3939

4040
impl Sphere {
41-
/// Get a reference to the sphere's origin.
41+
/// Get the sphere's origin.
4242
pub fn origin(&self) -> Vec3 {
4343
self.origin
4444
}
4545

46-
/// Get a reference to the sphere's radius.
46+
/// Get the sphere's radius.
4747
pub fn radius(&self) -> f32 {
4848
self.radius
4949
}
@@ -136,7 +136,7 @@ pub struct AABB {
136136
impl Primitive3d for AABB {
137137
fn outside_plane(&self, plane: Plane) -> bool {
138138
for vertex in self.vertices().iter() {
139-
if plane.distance_to_point(vertex) <= 0.0 {
139+
if plane.distance_to_point(*vertex) <= 0.0 {
140140
return false;
141141
}
142142
}
@@ -212,7 +212,7 @@ pub struct Frustum {
212212
impl Primitive3d for Frustum {
213213
fn outside_plane(&self, plane: Plane) -> bool {
214214
for vertex in self.vertices().iter() {
215-
if plane.distance_to_point(vertex) <= 0.0 {
215+
if plane.distance_to_point(*vertex) <= 0.0 {
216216
return false;
217217
}
218218
}
@@ -344,13 +344,13 @@ impl Plane {
344344
self.normal.dot(point) + -self.normal.dot(self.point)
345345
}
346346

347-
/// Get a reference to the plane's point.
348-
pub fn point(&self) -> &Vec3 {
349-
&self.point
347+
/// Get the plane's point.
348+
pub fn point(&self) -> Vec3 {
349+
self.point
350350
}
351351

352-
/// Get a reference to the plane's normal.
353-
pub fn normal(&self) -> &Vec3 {
354-
&self.normal
352+
/// Get the plane's normal.
353+
pub fn normal(&self) -> Vec3 {
354+
self.normal
355355
}
356356
}

0 commit comments

Comments
 (0)